fb14b03824
Currently, FIR reports errors caused by previous resolution failure. For example with unresolved `a` and `b` in code `a.b`, both `a` and `b` are highlighted. FE1.0 only highlights `a` since it's the root cause. This change applies this heuristics when reporting FirDiagnostics.
48 lines
691 B
Kotlin
Vendored
48 lines
691 B
Kotlin
Vendored
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
|
|
|
// FILE: 1.kt
|
|
open class A {
|
|
class Y {
|
|
fun A_Y() {}
|
|
}
|
|
|
|
companion object {
|
|
class Z {
|
|
fun A_C_Z() {}
|
|
}
|
|
}
|
|
}
|
|
|
|
// FILE: B.java
|
|
public class B extends A {
|
|
class Y {
|
|
void B_Y() {}
|
|
}
|
|
|
|
class Z {
|
|
void B_Z() {}
|
|
}
|
|
}
|
|
|
|
// FILE: C.java
|
|
public class C extends A {}
|
|
|
|
// FILE: 2.kt
|
|
class E: B() {
|
|
init {
|
|
Y().B_Y()
|
|
Y().<!UNRESOLVED_REFERENCE!>A_Y<!>()
|
|
|
|
Z().B_Z()
|
|
Z().<!UNRESOLVED_REFERENCE!>A_C_Z<!>()
|
|
}
|
|
}
|
|
|
|
class Y: C() {
|
|
init {
|
|
Y().A_Y()
|
|
|
|
<!UNRESOLVED_REFERENCE!>Z<!>().A_C_Z()
|
|
}
|
|
}
|