FIR: check subclass of sealed class
This commit is contained in:
committed by
TeamCityServer
parent
ed152e74a0
commit
10d4dfef04
+1
-1
@@ -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
|
||||
|
||||
+2
-2
@@ -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<!>()
|
||||
|
||||
Reference in New Issue
Block a user