Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/kt2109.kt
T
Andrey Breslav 3d8d92c7d3 JetDiagnosticsTest migrated to TestGenerator
- test data files renamed from *.jet to *.kt
2012-07-10 14:48:11 +04:00

21 lines
277 B
Kotlin

//KT-2109 Nullability inference fails in extension function
package kt2109
class A {
fun foo() {}
}
fun A?.bar() {
if (this == null) {
return
}
foo()
}
fun A.baz() {
if (<!SENSELESS_COMPARISON!>this == null<!>) {
return
}
foo()
}