Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2223.kt
T
2014-10-01 18:52:52 +04:00

9 lines
207 B
Kotlin
Vendored

//KT-2223 Comparing non-null value with null might produce helpful warning
package kt2223
fun foo() {
val x: Int? = null
if (x == null) return
if (<!SENSELESS_COMPARISON!>x == null<!>) return
}