Files
kotlin-fork/compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.fir.kt
T
Tianyu Geng fb14b03824 FIR checker: skip error named reference if receiver is unresolved
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.
2021-03-29 12:45:27 +03:00

52 lines
754 B
Kotlin
Vendored

package a
class A {
class Nested
inner class Inner
companion object {
class Nested2
val c: Int = 1
object Obj2 {
val c: Int = 1
}
}
object Obj
}
object O {
class A
object O
}
fun f() {
A.c
A.hashCode()
A().<!UNRESOLVED_REFERENCE!>Nested<!>
A.Nested()
A().Inner()
A.Companion.<!UNRESOLVED_REFERENCE!>Nested<!>
A.Companion.<!UNRESOLVED_REFERENCE!>Inner<!>
A.Inner
A.Companion.c
A.Companion.Obj2
A.Companion.Obj2.c
A.Companion.Nested2()
A.Companion.c
A.Obj
A.Companion.Obj2
A.<!UNRESOLVED_REFERENCE!>Obj2<!>
A.<!UNRESOLVED_REFERENCE!>Obj2<!>.c
A.<!UNRESOLVED_REFERENCE!>Nested2<!>
O.O
O.A()
}