Use TopLevelDeclarations analysis mode in REPL

#KT-12564 Fixed
This commit is contained in:
Alexander Udalov
2017-06-05 14:48:04 +03:00
parent b6d12fe7f3
commit 26e3d2cf5d
8 changed files with 94 additions and 1 deletions
+11
View File
@@ -0,0 +1,11 @@
>>> 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 }
^