aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/use_after_give.zc
blob: 72d344406592bb118bc2e9e1ab70a48cac760cb4 (plain) (blame)
1
2
3
4
5
6
namespace;
include rt;

// expect: x: used after it was given away
fn take(.d p) { return p[0]; }
fn main() { let x = rt.new(3); take(d*x); return x[0]; }