'val' in 'when' subject can't have modifiers (annotations are ok)

This commit is contained in:
Dmitry Petrov
2018-06-08 16:25:17 +03:00
parent 53fd883e2a
commit 67247ee490
9 changed files with 378 additions and 1 deletions
@@ -0,0 +1,7 @@
// !LANGUAGE: +VariableDeclarationInWhenSubject
fun test(data: String) =
when (data.length) {
0 -> -1
else -> 42
}