Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt10843.fir.kt
T
Jinseong Jeon 9b39a8abc2 FIR: avoid wrapping an erroneous type as FirResolvedTypeRef
Instead, use FirErrorTypeRef, a subtype of FirResolvedTypeRef
2021-04-29 22:31:38 +03:00

9 lines
270 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
// See EA-76890 / KT-10843: NPE during analysis
fun lambda(x : Int?) = x?.<!UNRESOLVED_REFERENCE!>let<!> l {
y ->
if (y <!UNRESOLVED_REFERENCE!>><!> 0) return@l x
y
}<!NOT_NULL_ASSERTION_ON_LAMBDA_EXPRESSION!>!!<!>