[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:
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
expect class Foo
|
||||
expect class Bar()
|
||||
expect class Baz constructor()
|
||||
expect class FooBar {
|
||||
constructor()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
<!EXPECT_CLASS_AS_FUNCTION!>Foo<!>()
|
||||
Bar()
|
||||
Baz()
|
||||
FooBar()
|
||||
}
|
||||
|
||||
// MODULE: m2-jvm()()(m1-common)
|
||||
// FILE: jvm.kt
|
||||
|
||||
actual class Foo
|
||||
actual class Bar
|
||||
actual class Baz
|
||||
actual class FooBar
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ interface KotlinXStringDemoInterface {
|
||||
// FILE: StringDemoInterface.kt
|
||||
actual typealias StringDemoInterface = KotlinXStringDemoInterface
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT("actual fun StringDemoInterface.plusK(): <ERROR TYPE REF: Unresolved name: value>; The following declaration is incompatible: expect fun StringDemoInterface.plusK(): String")!>actual fun StringDemoIn<!INCOMPATIBLE_MATCHING!>terface.plusK() = <!RESOLUTION_TO_CLASSIFIER!>StringValue<!>(value).plus("K")<!>.<!UNRESOLVED_REFERENCE!>value<!><!>
|
||||
<!ACTUAL_WITHOUT_EXPECT("actual fun StringDemoInterface.plusK(): <ERROR TYPE REF: Unresolved name: value>; The following declaration is incompatible: expect fun StringDemoInterface.plusK(): String")!>actual fun StringDemoIn<!INCOMPATIBLE_MATCHING!>terface.plusK() = <!EXPECT_CLASS_AS_FUNCTION!>StringValue<!>(value).plus("K")<!>.<!UNRESOLVED_REFERENCE!>value<!><!>
|
||||
|
||||
// FILE: main.kt
|
||||
class StringDemo(override val value: String) : StringDemoInterface
|
||||
|
||||
Reference in New Issue
Block a user