REPL: do not report warnings when there are errors
#KT-18349 Fixed
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
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 }
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
>>> (listOf(1) as List<String>).unresolved()
|
||||
error: unresolved reference: unresolved
|
||||
(listOf(1) as List<String>).unresolved()
|
||||
^
|
||||
>>> listOf<String>(1!!)
|
||||
error: the integer literal does not conform to the expected type String?
|
||||
listOf<String>(1!!)
|
||||
^
|
||||
error: type mismatch: inferred type is Int but String was expected
|
||||
listOf<String>(1!!)
|
||||
^
|
||||
Reference in New Issue
Block a user