4532f52898
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.
24 lines
376 B
Kotlin
Vendored
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 -> {}
|
|
}
|
|
}
|
|
}
|