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

// expect: buf: is lent to global sink; assign the global again before giving the local away
word sink;
fn main() { word buf = rt.new(4); sink = m*buf; rt.free(buf); sink = 0; return 0; }