[FIR] Properly create type ref for error type in various places

This commit is contained in:
Dmitriy Novozhilov
2023-02-01 16:40:04 +02:00
committed by Space Team
parent ad3ae0ff69
commit e9204521a9
25 changed files with 36 additions and 61 deletions
@@ -31,8 +31,8 @@ fun bar(aInstance: A, bInstance: B) {
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(bInstance) {
<!CANNOT_INFER_PARAMETER_TYPE, COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>(a, b)<!>, (c, d) ->
a <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Int>() }
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<String>() }
a checkType { _<Int>() }
b checkType { _<String>() }
c checkType { _<Double>() }
d checkType { _<Short>() }
}
@@ -71,5 +71,5 @@ fun test(b: B) {
b_3.m2()
val b_4 = <!UNRESOLVED_REFERENCE!>a<!>.B()
b_4.<!UNRESOLVED_REFERENCE!>m2<!>()
b_4.m2()
}
@@ -26,9 +26,9 @@ fun test(a_: a.b) {
a_.a_b()
val a_2 = a.<!UNRESOLVED_REFERENCE!>b<!>()
a_2.<!UNRESOLVED_REFERENCE!>a_b<!>()
a_2.<!UNRESOLVED_REFERENCE!>some_ab<!>()
a_2.<!UNRESOLVED_REFERENCE!>a_<!>()
a_2.a_b()
a_2.some_ab()
a_2.a_()
}
// FILE: c2.kt
@@ -55,4 +55,4 @@ fun test(_ab: a.b) {
val _ab2 = a.b()
_ab2.some_ab()
}
}
@@ -59,6 +59,6 @@ class CG : G<Int> {
class ERROR<E>() : <!UNRESOLVED_REFERENCE!>UR<!> {
fun test() {
super.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>super<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
}
}
@@ -18,7 +18,7 @@ FILE: kt50994.fir.kt
super<R|kotlin/Any|>()
}
public final var processors: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<R|ERROR CLASS: Type for SC is not inferred|, R|ERROR CLASS: Type for TC is not inferred|>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
public final var processors: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<<ERROR TYPE REF: Type for SC is not inferred>, <ERROR TYPE REF: Type for TC is not inferred>>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
public get(): R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>| {
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(_TC)>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
}