blob: cd82f1840098a2720d1d7e9e9a468677a02c6638 (
plain) (
blame)
1
2
3
4
5
6
|
namespace;
include rt;
// a owned return with no .u on the signature: the return type is inferred from the body
fn mk(v) { int* p = rt.new(1); p[0] = v; return p; }
fn main() { int* q = mk(3); rt.put_n(q[0]); rt.put_c(10); return 0; }
|