Pass DataFlowInfo through when-conditions
This commit is contained in:
@@ -11,7 +11,7 @@ fun foo() {
|
||||
}
|
||||
|
||||
when (x) {
|
||||
0 -> { if (x == null) return }
|
||||
0 -> { if (<!SENSELESS_COMPARISON!>x == null<!>) return }
|
||||
else -> { if (x == null) return }
|
||||
}
|
||||
bar(x)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
fun set(<!UNUSED_PARAMETER!>key<!> : String, <!UNUSED_PARAMETER!>value<!> : String) {
|
||||
val a : String? = ""
|
||||
when (a) {
|
||||
"" -> a<!UNSAFE_CALL!>.<!>get(0)
|
||||
"" -> a.get(0)
|
||||
is String, is Any -> a.compareTo("")
|
||||
else -> a.toString()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user