Warn about comma-separated conditions in when without argument.

See KT-5143.
This commit is contained in:
Dmitry Petrov
2015-11-19 18:21:46 +03:00
parent b9e9c47b28
commit da90c21284
18 changed files with 215 additions and 19 deletions
@@ -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 */ }
}
}