Improve diagnostic for non-actual declaration with weak incompatibility

This commit is contained in:
Mikhail Zarechenskiy
2017-10-11 20:04:42 +03:00
parent d0cbd73307
commit b2dc82f17e
9 changed files with 37 additions and 5 deletions
@@ -0,0 +1 @@
expect class Foo
@@ -0,0 +1 @@
interface Foo
@@ -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
^