Files
kotlin/compiler/testData/codegen/bytecodeText/when/subjectValInEnumWhenHasLocalVariableSlot.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

12 lines
205 B
Kotlin
Vendored

// !LANGUAGE: +VariableDeclarationInWhenSubject
enum class X { A, B, C }
fun test(a: X) =
when (val subject = a) {
X.A -> 0
X.B -> 1
X.C -> 2
}
// 1 LOCALVARIABLE subject