mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
10 lines
176 B
Kotlin
Vendored
10 lines
176 B
Kotlin
Vendored
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
|
// IGNORE_BACKEND: JS_IR
|
|
|
|
val x = 1
|
|
|
|
fun box() =
|
|
when (val y = x) {
|
|
in 0..2 -> "OK"
|
|
else -> "Fail: $y"
|
|
} |