Warn about comma-separated conditions in when without argument.
See KT-5143.
This commit is contained in:
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// "Replace ',' with '||' in when" "true"
|
||||
fun test(i: Int, j: Int) {
|
||||
var b = false
|
||||
when {
|
||||
i > 0<caret>, j > 0 -> { /* some code 1 */ }
|
||||
i < 0, j < 0 -> { /* some code 2 */ }
|
||||
else -> { /* other code */ }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user