[FE] Add test for compiling against library with kotlin sealed classes and interfaces

#KT-20423
#KT-13495
This commit is contained in:
Dmitriy Novozhilov
2020-11-20 13:36:49 +03:00
committed by TeamCityServer
parent 7897bb6adb
commit c0a1aecf9b
8 changed files with 87 additions and 0 deletions
@@ -0,0 +1,36 @@
import test.*
fun test_1(base: IBase) {
val x = when (base) {
is IA -> 1
is B -> 2
is C -> 3
is D -> 4
}
}
fun test_2(base: IBase) {
val x = when (base) {
is IA -> 1
is B.First -> 2
is B.Second -> 3
C.SomeValue -> 4
C.AnotherValue -> 5
D -> 6
}
}
fun test_3(base: Base) {
val x = when (base) {
is B -> 2
is D -> 4
}
}
fun test_4(base: Base) {
val x = when (base) {
is B.First -> 2
is B.Second -> 3
D -> 6
}
}