Add some data flow analysis tests on when
This commit is contained in:
committed by
Dmitry Petrov
parent
ae929d0f08
commit
148d03e365
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +VariableDeclarationInWhenSubject
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
||||
|
||||
|
||||
fun testNoSubjectVariableName(x: Int?) {
|
||||
val y = when (val<!SYNTAX!><!> = 42) {
|
||||
0 -> "0"
|
||||
else -> "not 0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user