Files
kotlin-fork/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.fir.kt
T
Tianyu Geng 454ae3b17a FIR checker: report UNSAFE_CALL for overloaded function calls
Previously if an unsafe call is to an overloaded function, FIR checkers
report NONE_APPLICABLE. This change instead report them as UNSAFE_CALL
or its variants.
2021-04-19 15:11:13 +03:00

7 lines
120 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
fun foo(): Int {
var i: Int? = 42
i = null
return i <!UNSAFE_OPERATOR_CALL!>+<!> 1
}