Support inline classes in MPP resolver/checker model
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
@file:Suppress("UNSUPPORTED_FEATURE")
|
||||
|
||||
expect inline class Foo1(val x: Int)
|
||||
expect inline class Foo2(val y: String)
|
||||
@@ -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,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)
|
||||
^
|
||||
Reference in New Issue
Block a user