Files
Dmitriy Dolovov 4532f52898 IR text tests: Unmute enum class-related tests
Making enum class-related tests unmuted requires implementing
a special "compatibility" mode for IR tree dumper to filter out
fake override declarations leaking from java.enum.Enum and
kotlin.Enum (JVM-only) classes.
2023-11-30 08:32:35 +00:00

24 lines
376 B
Kotlin
Vendored

enum class En { A, B, C }
fun test() {
var r = ""
val x: Any? = En.A
if (x is En) {
when (x) {
En.A -> { r = "when1" }
En.B -> {}
En.C -> {}
}
}
val y: Any = En.A
if (y is En) {
when (y) {
En.A -> { r = "when2" }
En.B -> {}
En.C -> {}
}
}
}