0ff9982b31
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
33 lines
730 B
Kotlin
Vendored
33 lines
730 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 = <!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()
|
|
}
|
|
}
|