mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
Generate debug information for 'when' subject variable
NB debugger tests currently don't support language version or individual language feature settings.
This commit is contained in:
10
compiler/testData/codegen/bytecodeText/when/subjectValInStringWhenHasLocalVariableSlot.kt
vendored
Normal file
10
compiler/testData/codegen/bytecodeText/when/subjectValInStringWhenHasLocalVariableSlot.kt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
||||
|
||||
fun test(a: String) =
|
||||
when (val subject = a) {
|
||||
"" -> 0
|
||||
"a" -> 1
|
||||
else -> -1
|
||||
}
|
||||
|
||||
// 1 LOCALVARIABLE subject
|
||||
Reference in New Issue
Block a user