Warn about comma-separated conditions in when without argument.
See KT-5143.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
public fun test(o: String?): Boolean {
|
||||
return when {
|
||||
// Data flow info should propagate from o == null to o.length
|
||||
o == null, <!DEBUG_INFO_SMARTCAST!>o<!>.length == 0 -> false
|
||||
o == null<!COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT!>,<!> <!DEBUG_INFO_SMARTCAST!>o<!>.length == 0 -> false
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user