Refactor sealed subclass to object: add tests, fix type parameter case
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: none
|
||||
|
||||
sealed class Sealed<T>
|
||||
|
||||
<caret>class SubSealed<T> : Sealed<T>()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: none
|
||||
|
||||
sealed class Sealed(val y: Int)
|
||||
|
||||
<caret>class SubSealed(x: Int) : Sealed(x)
|
||||
@@ -0,0 +1,5 @@
|
||||
// PROBLEM: none
|
||||
|
||||
sealed class Sealed
|
||||
|
||||
open <caret>class SubSealed : Sealed()
|
||||
@@ -0,0 +1,9 @@
|
||||
// PROBLEM: none
|
||||
|
||||
sealed class Sealed
|
||||
|
||||
<caret>class SubSealed : Sealed() {
|
||||
companion object {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// PROBLEM: none
|
||||
|
||||
sealed class Sealed
|
||||
|
||||
<caret>class SubSealed : Sealed() {
|
||||
val x: Int = 42
|
||||
|
||||
inner class Inner {
|
||||
fun foo() = x
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user