[FIR] Make resolution of classes in FirProvider more reasonable.
See the `privateInFile.fir.kt` test. Type mismatches are simply confusing. `inheritorOfExpectSealedClass.out` reports unresolved reference probably because now it resolves into the expect declaration, rather than the actual one. K1 doesn't report UNRESOLVED_REFERENCE in this case. But this is red code anyway. And this behavior still depends on the order in which the compiler receives both the declarations. ^KT-59927 ^KT-62567
This commit is contained in:
committed by
Space Team
parent
a9ceae9667
commit
41c3f98419
@@ -6,16 +6,16 @@ private class C {
|
||||
private typealias TA = C
|
||||
|
||||
private val test1: <!INVISIBLE_REFERENCE!>C<!> = <!INVISIBLE_REFERENCE!>C<!>()
|
||||
private val test1co: <!INVISIBLE_REFERENCE!>C<!>.Companion = <!INITIALIZER_TYPE_MISMATCH, INVISIBLE_REFERENCE, NO_COMPANION_OBJECT!>C<!>
|
||||
private val test1co: <!INVISIBLE_REFERENCE!>C<!>.Companion = <!INVISIBLE_REFERENCE!>C<!>
|
||||
|
||||
private val test2: <!INVISIBLE_REFERENCE!>TA<!> = <!INVISIBLE_REFERENCE!>TA<!>()
|
||||
private val test2co = <!INVISIBLE_REFERENCE!>TA<!>
|
||||
|
||||
// FILE: file2.kt
|
||||
private val test1: C = C()
|
||||
private val test1co: C.Companion = <!INITIALIZER_TYPE_MISMATCH, NO_COMPANION_OBJECT!>C<!>
|
||||
private val test1co: C.Companion = C
|
||||
|
||||
private val test2: TA = <!INVISIBLE_REFERENCE!>TA<!>()
|
||||
private val test2: TA = TA()
|
||||
private val test2co = TA
|
||||
|
||||
private class <!PACKAGE_OR_CLASSIFIER_REDECLARATION!>C<!>
|
||||
|
||||
Reference in New Issue
Block a user