Files
kotlin-fork/compiler/testData/diagnostics/tests/inner/constructorAccess.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

33 lines
697 B
Kotlin
Vendored

class Outer1 {
class Nested
class C1 { val b = Nested() }
class C2(val b: Any = Nested())
inner class C3 { val b = Nested() }
inner class C4(val b: Any = Nested())
inner class Inner
class C5 { val b = <!RESOLUTION_TO_CLASSIFIER!>Inner<!>() }
class C6(val b: Any = <!RESOLUTION_TO_CLASSIFIER!>Inner<!>())
inner class C7 { val b = Inner() }
inner class C8(val b: Any = Inner())
}
class Outer2 {
class Nested {
fun foo() = Outer2()
fun bar() = <!RESOLUTION_TO_CLASSIFIER!>Inner<!>()
}
inner class Inner {
fun foo() = Outer2()
fun bar() = Nested()
}
fun foo() {
Nested()
Inner()
}
}