[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
This commit is contained in:
Brian Norman
2023-06-02 09:34:49 -05:00
committed by Space Team
parent ac79633590
commit 0ff9982b31
44 changed files with 582 additions and 39 deletions
@@ -0,0 +1,32 @@
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 = <!INNER_CLASS_CONSTRUCTOR_NO_RECEIVER!>Inner<!>() }
class C6(val b: Any = <!INNER_CLASS_CONSTRUCTOR_NO_RECEIVER!>Inner<!>())
inner class C7 { val b = Inner() }
inner class C8(val b: Any = Inner())
}
class Outer2 {
class Nested {
fun foo() = Outer2()
fun bar() = <!INNER_CLASS_CONSTRUCTOR_NO_RECEIVER!>Inner<!>()
}
inner class Inner {
fun foo() = Outer2()
fun bar() = Nested()
}
fun foo() {
Nested()
Inner()
}
}