mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
NB debugger tests currently don't support language version or individual language feature settings.
10 lines
185 B
Kotlin
Vendored
10 lines
185 B
Kotlin
Vendored
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
|
|
|
fun test(a: String) =
|
|
when (val subject = a) {
|
|
"" -> 0
|
|
"a" -> 1
|
|
else -> -1
|
|
}
|
|
|
|
// 1 LOCALVARIABLE subject |