Files
kotlin-fork/compiler/testData/psi/WhenWithSubjectVariable.kt
T
Dmitry Petrov 8aec99f4b5 Fix parsing variable declaration in when subject
- parse destructuring declarations
- parse annotations on variable declaration in when subject
2018-06-20 14:06:34 +03:00

15 lines
412 B
Kotlin
Vendored

fun test() {
when (val x1 = foo) {}
when (val x2t: T) {}
when (val y2t: T = foo) {}
when (val (x3, x4) = foo) {}
when (val (y3t: T, y4) = foo) {}
when (val (z3, z4t: T) = foo) {}
when (val (w3t: T, w4t: T) = foo) {}
when (val T.x5 = foo) {}
when (val T1.x5t: T2 = foo) {}
when (@Ann val x6a = foo) {}
when (val x7a: @Ann T = foo) {}
when (val x8a = @Ann foo) {}
}