Rework C bindings generator to pure descriptor-based system. (#1193)
This commit is contained in:
@@ -2352,7 +2352,9 @@ task produce_dynamic(type: DynamicKonanTest) {
|
||||
"Child.fooParam: c 3\n" +
|
||||
"Impl1.I: d 4 Impl1\n" +
|
||||
"Impl2.I: e 5 Impl2\n" +
|
||||
"String is Kotlin/Native\n"
|
||||
"String is Kotlin/Native\n" +
|
||||
"RO property is 42\n" +
|
||||
"RW property is 239\n"
|
||||
}
|
||||
|
||||
task buildKonanTests(type: BuildKonanTest) {
|
||||
|
||||
@@ -16,6 +16,13 @@ open class Base {
|
||||
|
||||
class Child : Base() {
|
||||
override fun fooParam(arg0: String, arg1: Int) = println("Child.fooParam: $arg0 $arg1")
|
||||
|
||||
val roProperty: Int
|
||||
get() = 42
|
||||
|
||||
var rwProperty: Int = 0
|
||||
get() = field
|
||||
set(value) { field = value + 1 }
|
||||
}
|
||||
|
||||
// Interface.
|
||||
|
||||
@@ -25,6 +25,10 @@ int main(void) {
|
||||
|
||||
printf("String is %s\n", string);
|
||||
|
||||
printf("RO property is %d\n", __ kotlin.root.Child.get_roProperty(child));
|
||||
__ kotlin.root.Child.set_rwProperty(child, 238);
|
||||
printf("RW property is %d\n", __ kotlin.root.Child.get_rwProperty(child));
|
||||
|
||||
__ DisposeString(string);
|
||||
__ DisposeStablePointer(base.pinned);
|
||||
__ DisposeStablePointer(child.pinned);
|
||||
|
||||
Reference in New Issue
Block a user