Don't serialize expect declaration descriptors (#1307)
Thus fix producing .klib from multi-platform sources
This commit is contained in:
committed by
GitHub
parent
d408b50305
commit
0dc0831405
@@ -1959,6 +1959,13 @@ task mpp1(type: RunStandaloneKonanTest) {
|
||||
flags = ['-tr', '-Xmulti-platform']
|
||||
}
|
||||
|
||||
task mpp2(type: LinkKonanTest) {
|
||||
goldValue = "C(arg=42)\ntrue\n1\nh\n"
|
||||
source = "codegen/mpp/mpp2.kt"
|
||||
lib = "codegen/mpp/libmpp2.kt"
|
||||
flags = ['-Xmulti-platform']
|
||||
}
|
||||
|
||||
task unit1(type: RunKonanTest) {
|
||||
goldValue = "First\nkotlin.Unit\n"
|
||||
source = "codegen/basics/unit1.kt"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
expect class C {
|
||||
constructor(arg: Any?)
|
||||
}
|
||||
|
||||
actual data class C actual constructor(val arg: Any?) {
|
||||
|
||||
}
|
||||
|
||||
expect class T
|
||||
actual typealias T = C
|
||||
|
||||
expect fun f(arg: Int): Int
|
||||
actual fun f(arg: Int) = arg
|
||||
|
||||
expect var p: String
|
||||
actual var p: String = "p"
|
||||
@@ -0,0 +1,8 @@
|
||||
fun main(args: Array<String>) {
|
||||
println(C(42))
|
||||
println(C(42) is T)
|
||||
println(f(1))
|
||||
|
||||
p = "h"
|
||||
println(p)
|
||||
}
|
||||
Reference in New Issue
Block a user