Improve diagnostic for non-actual declaration with weak incompatibility
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ expect fun foo3<!JVM:NO_ACTUAL_FOR_EXPECT!>()<!>: Int
|
||||
|
||||
// FILE: jvm.kt
|
||||
|
||||
<!ACTUAL_WITHOUT_EXPECT!>interface<!> Foo1
|
||||
<!DECLARATION_WITH_INCOMPATIBLE_EXPECT!>interface<!> Foo1
|
||||
actual <!ACTUAL_WITHOUT_EXPECT!>interface<!> Foo2
|
||||
|
||||
actual fun foo1(): <!ACTUAL_WITHOUT_EXPECT!>String<!> = ""
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
expect class Foo
|
||||
+1
@@ -0,0 +1 @@
|
||||
interface Foo
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
-- Common --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
compiler/testData/multiplatform/weakIncompatibilityWithoutActualModifier/jvm.kt:1:1: error: interface 'Foo' has no corresponding expected declaration
|
||||
The following declaration is incompatible because class kinds are different (class, interface, object, enum, annotation):
|
||||
public final expect class Foo
|
||||
|
||||
interface Foo
|
||||
^
|
||||
Reference in New Issue
Block a user