Support actualization of expect sealed class with typealias in CliSealedClassInheritorsProvider
This commit is contained in:
committed by
TeamCityServer
parent
fe81078366
commit
a107e3d160
+25
@@ -0,0 +1,25 @@
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// ISSUE: KT-45796
|
||||
// SKIP_TXT
|
||||
|
||||
// MODULE: m1-common
|
||||
expect sealed class SealedClass()
|
||||
|
||||
class Derived1 : SealedClass()
|
||||
|
||||
// MODULE: m1-jvm(m1-common)
|
||||
actual typealias SealedClass = MySealedClass
|
||||
|
||||
sealed class MySealedClass
|
||||
|
||||
class Derived2 : SealedClass()
|
||||
class Derived3 : MySealedClass()
|
||||
|
||||
fun whenForSealed(s: SealedClass): Int {
|
||||
return when (s) { // Should be OK
|
||||
is Derived1 -> 1
|
||||
is Derived2 -> 2
|
||||
is Derived3 -> 3
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user