mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
7 lines
139 B
Kotlin
Vendored
7 lines
139 B
Kotlin
Vendored
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
|
|
|
fun test(data: String) =
|
|
when (data.length) {
|
|
0 -> -1
|
|
else -> 42
|
|
} |