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
254 B
Kotlin
Vendored
10 lines
254 B
Kotlin
Vendored
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
|
|
|
fun test(a: Any) =
|
|
when (val subject = a) {
|
|
is Int -> "Int $subject"
|
|
is String -> "String ${subject.length}"
|
|
else -> "other"
|
|
}
|
|
|
|
// 1 LOCALVARIABLE subject Ljava/lang/Object; |