Allow "add constructor invocation" for sealed top-level inheritors
So #KT-23320 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
d54c57f9df
commit
2d4ef8d1e6
+8
@@ -0,0 +1,8 @@
|
||||
// "Change to constructor invocation" "false"
|
||||
// ERROR: This type has a constructor, and thus must be initialized here
|
||||
// ERROR: This type is sealed, so it can be inherited by only its own nested classes or objects
|
||||
sealed class A
|
||||
|
||||
fun test() {
|
||||
class B : A<caret>
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Change to constructor invocation" "false"
|
||||
// ERROR: This type has a constructor, and thus must be initialized here
|
||||
// ERROR: This type is sealed, so it can be inherited by only its own nested classes or objects
|
||||
|
||||
class My {
|
||||
sealed class A
|
||||
|
||||
class B : A<caret>
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Change to constructor invocation" "true"
|
||||
sealed class A
|
||||
class B : A<caret>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
// "Change to constructor invocation" "true"
|
||||
sealed class A
|
||||
class B : A<caret>()
|
||||
Reference in New Issue
Block a user