FIR checker: COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT
FIR simply ignores anything after the first comma if the when expression doesn't have a subject. Hence, the checker has to rely on PSI structure instead.
This commit is contained in:
committed by
Ivan Kochurkin
parent
db12a96e54
commit
1679da45ab
@@ -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, o.length == 0 -> false
|
||||
o == null<!COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT!>,<!> o.length == 0 -> false
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user