aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/infer_return.zc
blob: a9f12bd3919e0bd98d8e33c39db09a443042cf8b (plain) (blame)
1
2
3
// a owned return with no .u on the signature: the return type is inferred from the body
fn mk(v) { int* p = new(1); p[0] = v; return p; }
fn main() { int* q = mk(3); put_n(q[0]); put_c(10); return 0; }