KT-21929 Inappropriate quick fix for a sealed class instantiation (#1444)

This commit is contained in:
Toshiaki Kameyama
2018-01-03 19:20:58 +09:00
committed by Dmitry Jemerov
parent de185b79d0
commit 16695c1af5
5 changed files with 38 additions and 0 deletions
@@ -0,0 +1,10 @@
// "Make '<init>' public" "false"
// "Make '<init>' internal" "false"
// ERROR: Cannot access '<init>': it is private in 'SealedClass'
// ERROR: This type is sealed, so it can be inherited by only its own nested classes or objects
sealed class SealedClass
fun test() {
class Test : <caret>SealedClass()
}
@@ -0,0 +1,6 @@
// "Make 'SealedClass' public" "true"
// ACTION: "Make 'Test' private"
private sealed class SealedClass
class Test : <caret>SealedClass()
@@ -0,0 +1,6 @@
// "Make 'SealedClass' public" "true"
// ACTION: "Make 'Test' private"
sealed class SealedClass
class Test : SealedClass()