Allow "add constructor invocation" for sealed top-level inheritors

So #KT-23320 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-03-24 08:30:39 +03:00
committed by Mikhail Glukhikh
parent d54c57f9df
commit 2d4ef8d1e6
6 changed files with 71 additions and 24 deletions
@@ -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>
}
@@ -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>
}
@@ -0,0 +1,3 @@
// "Change to constructor invocation" "true"
sealed class A
class B : A<caret>
@@ -0,0 +1,3 @@
// "Change to constructor invocation" "true"
sealed class A
class B : A<caret>()