mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
16 lines
231 B
Kotlin
Vendored
16 lines
231 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
enum class E {
|
|
A, B;
|
|
}
|
|
|
|
fun foo(e: E?): String {
|
|
val c = when (e) {
|
|
null -> "Fail: null"
|
|
E.B -> "OK"
|
|
E.A -> "Fail: A"
|
|
}
|
|
return c
|
|
}
|
|
|
|
fun box(): String = foo(E.B)
|