FIR: check subclass of sealed class

This commit is contained in:
Tianyu Geng
2021-06-25 17:39:35 -07:00
committed by TeamCityServer
parent ed152e74a0
commit 10d4dfef04
18 changed files with 110 additions and 66 deletions
@@ -12,7 +12,7 @@ fun test_1(b: Base) = when (b) {
// MODULE: m1-jvm()()(m1-common)
class PlatfromDerived : Base() // must be an error
class PlatfromDerived : <!SEALED_INHERITOR_IN_DIFFERENT_MODULE!>Base<!>() // must be an error
fun test_2(b: Base) = when (b) {
is Derived -> 1
@@ -13,10 +13,10 @@ expect sealed class SealedWithPlatformActuals : SealedWithSharedActual
package foo
actual sealed class SealedWithSharedActual
class SimpleShared : <!UNRESOLVED_REFERENCE!>SealedWithPlatformActuals<!>()
class SimpleShared : <!SEALED_INHERITOR_IN_DIFFERENT_MODULE, UNRESOLVED_REFERENCE!>SealedWithPlatformActuals<!>()
// MODULE: main()()(intermediate)
// TARGET_PLATFORM: JVM
package foo
actual sealed class SealedWithPlatformActuals <!ACTUAL_WITHOUT_EXPECT, NON_PRIVATE_OR_PROTECTED_CONSTRUCTOR_IN_SEALED!>actual constructor()<!>: SealedWithSharedActual()
actual sealed class SealedWithPlatformActuals <!ACTUAL_WITHOUT_EXPECT, NON_PRIVATE_OR_PROTECTED_CONSTRUCTOR_IN_SEALED!>actual constructor()<!>: <!SEALED_INHERITOR_IN_DIFFERENT_MODULE!>SealedWithSharedActual<!>()