TEST:object initialization
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
extern void *resolve_symbol(const char*);
|
||||
|
||||
int
|
||||
run_test() {
|
||||
int (*foo)(int, int) = resolve_symbol("kfun:foo");
|
||||
|
||||
if (foo(2, 3) != 2) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
open class A(val a:Int, val b:Int)
|
||||
|
||||
open class B(val c:Int, d:Int):A(c, d)
|
||||
|
||||
//class C():B(42)
|
||||
|
||||
fun foo(i:Int, j:Int):Int {
|
||||
val b = B(i, j)
|
||||
return b.c
|
||||
}
|
||||
Reference in New Issue
Block a user