Support inline classes in MPP resolver/checker model

This commit is contained in:
Mikhail Zarechenskiy
2018-06-08 15:30:27 +03:00
parent 3d57276bc6
commit 8148bdc4d0
14 changed files with 235 additions and 15 deletions
@@ -0,0 +1,4 @@
@file:Suppress("UNSUPPORTED_FEATURE")
expect inline class Foo1(val x: Int)
expect inline class Foo2(val y: String)
+5
View File
@@ -0,0 +1,5 @@
@file:Suppress("UNSUPPORTED_FEATURE")
actual inline class Foo1(val x: Int)
actual class Foo2 actual constructor(actual val y: String)
+5
View File
@@ -0,0 +1,5 @@
@file:Suppress("UNSUPPORTED_FEATURE")
actual inline class Foo1(val x: Int)
actual class Foo2 actual constructor(actual val y: String)
@@ -0,0 +1,23 @@
-- Common --
Exit code: OK
Output:
-- JVM --
Exit code: COMPILATION_ERROR
Output:
compiler/testData/multiplatform/inlineClasses/jvm.kt:5:1: error: actual class 'Foo2' has no corresponding expected declaration
The following declaration is incompatible because modifiers are different (companion, inner, inline):
public final expect inline class Foo2
actual class Foo2 actual constructor(actual val y: String)
^
-- JS --
Exit code: COMPILATION_ERROR
Output:
compiler/testData/multiplatform/inlineClasses/js.kt:5:1: error: actual class 'Foo2' has no corresponding expected declaration
The following declaration is incompatible because modifiers are different (companion, inner, inline):
public final expect inline class Foo2
actual class Foo2 actual constructor(actual val y: String)
^