[Test] Update testdata of quickfix tests related to sealed classes
This commit is contained in:
+1
-2
@@ -5,7 +5,6 @@
|
||||
// ACTION: Create member function 'Foo.component2'
|
||||
// ACTION: Enable a trailing comma by default in the formatter
|
||||
// ACTION: Put arguments on separate lines
|
||||
// ERROR: Cannot access '<init>': it is private in 'Foo'
|
||||
// ERROR: Destructuring declaration initializer of type Foo must have a 'component1()' function
|
||||
// ERROR: Destructuring declaration initializer of type Foo must have a 'component2()' function
|
||||
// ERROR: Sealed types cannot be instantiated
|
||||
@@ -13,4 +12,4 @@ sealed class Foo(val bar: String, val baz: Int)
|
||||
|
||||
fun test() {
|
||||
var (bar, baz) = Foo("A", 1)<caret>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@
|
||||
|
||||
sealed class <caret>Base {
|
||||
abstract fun foo(): Int
|
||||
}
|
||||
}
|
||||
|
||||
+6
-5
@@ -4,9 +4,10 @@
|
||||
|
||||
sealed class Base {
|
||||
abstract fun foo(): Int
|
||||
class BaseImpl : Base() {
|
||||
override fun foo(): Int {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
|
||||
class BaseImpl : Base() {
|
||||
override fun foo(): Int {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Implement sealed class" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
|
||||
sealed class <caret>Sealed
|
||||
sealed class <caret>Sealed
|
||||
|
||||
+2
-3
@@ -1,6 +1,5 @@
|
||||
// "Implement sealed class" "true"
|
||||
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
|
||||
|
||||
sealed class Sealed {
|
||||
class SealedImpl : Sealed()
|
||||
}
|
||||
sealed class Sealed
|
||||
class SealedImpl : Sealed()
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ sealed class <caret>Base {
|
||||
class BaseImpl : Base() {
|
||||
override fun foo() = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ sealed class Base {
|
||||
class BaseImpl : Base() {
|
||||
override fun foo() = throw UnsupportedOperationException()
|
||||
}
|
||||
}
|
||||
|
||||
class BaseImpl1 : Base() {
|
||||
override fun foo(): Int {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
class BaseImpl : Base() {
|
||||
override fun foo(): Int {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// "Make '<init>' public" "false"
|
||||
// "Make '<init>' internal" "false"
|
||||
// ACTION: Introduce import alias
|
||||
// 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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user