Support actualization of expect sealed class with typealias in CliSealedClassInheritorsProvider

This commit is contained in:
Dmitriy Novozhilov
2021-04-05 13:39:09 +03:00
committed by TeamCityServer
parent fe81078366
commit a107e3d160
4 changed files with 47 additions and 6 deletions
@@ -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
}
}