aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/borrowmove.zc
blob: e229fab7f37d923724924f93a9aec18f8c884b40 (plain) (blame)
1
2
3
4
5
namespace;
include rt;

fn put(.m box, int v) { int* c = rt.new(int); *c = v; box[0] = c; return 0; }
fn main() { let b = rt.new(1); put(b, 6); rt.put_n(*(b[0] as int*)); rt.put_c(10); return 0; }