Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/innerClasses/inner.kt
T
Brian Norman 0ff9982b31 [FIR] Additional errors to distinguish resolution to classifier cases
When a call is resolved to a classifier, only a single error message was
being used for multiple cases. This lead to confusion as the default
message may not be applicable to a given error case. Added additional
errors and messages to distinguish between these error cases.

#KT-57251 Fixed
2023-06-16 16:26:50 +00:00

39 lines
624 B
Kotlin
Vendored

class Owner {
fun foo() {
bar()
this.bar()
}
fun bar() {
val i = Inner()
i.baz()
}
fun err() {}
inner class Inner {
fun baz() {
gau()
this.gau()
}
fun gau() {
val o = Owner()
o.foo()
foo()
this@Owner.foo()
this.<!UNRESOLVED_REFERENCE!>err<!>()
}
}
}
fun test() {
val o = Owner()
o.foo()
val err = Owner.<!INNER_CLASS_CONSTRUCTOR_NO_RECEIVER!>Inner<!>()
err.<!UNRESOLVED_REFERENCE!>baz<!>()
val i = o.Inner()
i.gau()
}