Files
kotlin-fork/compiler/testData/repl/controlFlow/incompleteWhen.repl
T
Alexander Udalov 26e3d2cf5d Use TopLevelDeclarations analysis mode in REPL
#KT-12564 Fixed
2017-06-06 14:00:45 +03:00

12 lines
379 B
Plaintext
Vendored

>>> val a = when(null) { }
error: 'when' expression must be exhaustive, add necessary 'else' branch
val a = when(null) { }
^
warning: the expression is unused
val a = when(null) { }
^
>>> "" + when (true) { true -> 42 }
error: 'when' expression must be exhaustive, add necessary 'false' branch or 'else' branch instead
"" + when (true) { true -> 42 }
^