[klib] Add an option to write out header klibs
The header klib is supposed to only contain the public abi of the module similar to jvm-abi-gen. It is intended to be used as a dependency for other klib compilations instead of the full klib for compilation avoidance. ^KT-60807
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
package lib
|
||||
|
||||
class A private constructor(val x: Int) {
|
||||
companion object {
|
||||
fun create(x: Int): A = A(x * 2)
|
||||
}
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
package app
|
||||
|
||||
import lib.*
|
||||
|
||||
fun runAppAndReturnOk(): String {
|
||||
val a = A.create(10)
|
||||
if (a.x != 20) error("a.x is '${a.x}', but is expected to be '20'")
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user