Files
kotlin/compiler/testData/codegen/bytecodeText/when/subjectValHasLocalVariableSlot.kt
Dmitry Petrov a4b5d74ae3 Generate debug information for 'when' subject variable
NB debugger tests currently don't support language version or individual
language feature settings.
2018-06-20 14:06:34 +03:00

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;