FIR: avoid wrapping an erroneous type as FirResolvedTypeRef

Instead, use FirErrorTypeRef, a subtype of FirResolvedTypeRef
This commit is contained in:
Jinseong Jeon
2021-04-20 22:57:36 -07:00
committed by TeamCityServer
parent 887032667d
commit 9b39a8abc2
34 changed files with 98 additions and 79 deletions
@@ -12,5 +12,5 @@ val s: String = "test"
fun ff() {
val a = Test<!UNEXPECTED_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>FOO<!>
val b = foo<!UNEXPECTED_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>s<!>
System<!UNEXPECTED_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>out<!>.<!UNRESOLVED_REFERENCE!>println<!>(a + b)
System<!UNEXPECTED_SAFE_CALL!>?.<!><!UNRESOLVED_REFERENCE!>out<!>.println(a + b)
}
@@ -13,7 +13,7 @@ fun fun_with_where() = fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!> <!UNRESOLVED_RE
fun outer() {
devNull(fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!>() {})
devNull(fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!> <!UNRESOLVED_REFERENCE!>T<!>.() {})
devNull(fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!> (): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> = null!!)
devNull(fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!> (): <!UNRESOLVED_REFERENCE!>T<!> = null!!)
devNull(fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!> (t: <!UNRESOLVED_REFERENCE!>T<!>) {})
devNull(fun <!TYPE_PARAMETERS_NOT_ALLOWED!><T><!> () where T:A {})
}
@@ -1,7 +1,7 @@
// !WITH_NEW_INFERENCE
// NI_EXPECTED_FILE
// See EA-76890 / KT-10843: NPE during analysis
fun lambda(x : Int?) = x?.<!UNRESOLVED_REFERENCE!>let<!> <!UNRESOLVED_REFERENCE!>l<!> {
fun lambda(x : Int?) = x?.<!UNRESOLVED_REFERENCE!>let<!> l {
y ->
if (y <!UNRESOLVED_REFERENCE!>><!> 0) return@l x
y