[FE 1.0] Prohibit confusing syntax inside when branches
^KT-48385 Fixed
This commit is contained in:
committed by
teamcityserver
parent
653fc85461
commit
1513e739c6
@@ -14,7 +14,7 @@
|
||||
fun foo(arg: Boolean): String {
|
||||
// Must be exhaustive
|
||||
return <!NO_ELSE_IN_WHEN!>when<!>(arg) {
|
||||
2 == 2 -> "truth"
|
||||
2 == 1 -> "falsehood"
|
||||
(2 == 2) -> "truth"
|
||||
(2 == 1) -> "falsehood"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user