Smart casts to nothing after comparison with null
This commit is contained in:
committed by
Mikhail Glukhikh
parent
981d471ebe
commit
b556037915
@@ -0,0 +1,6 @@
|
||||
fun bar(x: Int?): Int {
|
||||
if (x != null) return -1
|
||||
if (<!SENSELESS_COMPARISON!>x == null<!>) return -2
|
||||
// Should be unreachable
|
||||
return 2 + 2
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun bar(/*0*/ x: kotlin.Int?): kotlin.Int
|
||||
Reference in New Issue
Block a user