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.
12 lines
205 B
Kotlin
Vendored
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 |