[FIR] Supertype and inheritance checkers group
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
sealed class Base
|
||||
|
||||
class Derived: Base() {
|
||||
class Derived2: Base()
|
||||
class Derived2: <!SEALED_SUPERTYPE!>Base<!>()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
class Local: Base()
|
||||
class Local: <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>Base<!>()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
sealed class Sealed {
|
||||
object First: Sealed()
|
||||
open class NonFirst: Sealed() {
|
||||
object Second: NonFirst()
|
||||
object Third: NonFirst()
|
||||
fun foo(): Int {
|
||||
val s = object: Sealed() {}
|
||||
class Local: Sealed() {}
|
||||
return s.hashCode()
|
||||
}
|
||||
}
|
||||
val p: Sealed = object: Sealed() {}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
sealed class Sealed {
|
||||
object First: Sealed()
|
||||
open class NonFirst: Sealed() {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sealed class Base {
|
||||
fun foo() = Base()
|
||||
fun foo() = <!SEALED_CLASS_CONSTRUCTOR_CALL!>Base<!>()
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ class A {
|
||||
sealed class Base
|
||||
}
|
||||
|
||||
class Derived : A.Base()
|
||||
class Derived : <!SEALED_SUPERTYPE!>A.Base<!>()
|
||||
|
||||
fun test() {
|
||||
class DerivedLocal : A.Base()
|
||||
class DerivedLocal : <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>A.Base<!>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user