aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/use_after_give.zc
blob: 8a1092273a033069ef9e405af94e3f67fcca77cc (plain) (blame)
1
2
3
// expect: x: used after it was given away
fn take(.d p) { return p[0]; }
fn main() { let x = new(3); take(d*x); return x[0]; }