mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
10 lines
177 B
Kotlin
Vendored
10 lines
177 B
Kotlin
Vendored
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
|
// IGNORE_BACKEND: JS
|
|
|
|
val x: Any = 1
|
|
|
|
fun box() =
|
|
when (val y = x) {
|
|
is Int -> "OK"
|
|
else -> "Fail: $y"
|
|
} |