[Test] Update testdata of quickfix tests related to sealed classes

This commit is contained in:
Dmitriy Novozhilov
2021-01-14 08:54:05 +03:00
parent 7632c11745
commit 16e0c0b820
8 changed files with 18 additions and 20 deletions
-1
View File
@@ -5,7 +5,6 @@
// ACTION: Create member function 'Foo.component2' // ACTION: Create member function 'Foo.component2'
// ACTION: Enable a trailing comma by default in the formatter // ACTION: Enable a trailing comma by default in the formatter
// ACTION: Put arguments on separate lines // 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 'component1()' function
// ERROR: Destructuring declaration initializer of type Foo must have a 'component2()' function // ERROR: Destructuring declaration initializer of type Foo must have a 'component2()' function
// ERROR: Sealed types cannot be instantiated // ERROR: Sealed types cannot be instantiated
+5 -4
View File
@@ -4,9 +4,10 @@
sealed class Base { sealed class Base {
abstract fun foo(): Int 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")
} }
} }
+2 -3
View File
@@ -1,6 +1,5 @@
// "Implement sealed class" "true" // "Implement sealed class" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION // SHOULD_BE_AVAILABLE_AFTER_EXECUTION
sealed class Sealed { sealed class Sealed
class SealedImpl : Sealed() class SealedImpl : Sealed()
}
@@ -8,10 +8,10 @@ sealed class Base {
class BaseImpl : Base() { class BaseImpl : Base() {
override fun foo() = throw UnsupportedOperationException() override fun foo() = throw UnsupportedOperationException()
} }
}
class BaseImpl1 : Base() { class BaseImpl : Base() {
override fun foo(): Int { override fun foo(): Int {
TODO("Not yet implemented") TODO("Not yet implemented")
}
} }
} }
@@ -1,7 +1,6 @@
// "Make '<init>' public" "false" // "Make '<init>' public" "false"
// "Make '<init>' internal" "false" // "Make '<init>' internal" "false"
// ACTION: Introduce import alias // 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 // ERROR: This type is sealed, so it can be inherited by only its own nested classes or objects
sealed class SealedClass sealed class SealedClass