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

// expect: buf: is lent to global sink; assign the global again before the block that lent it ends
word sink;
fn main() { word buf = rt.new(4); sink = m*buf; if (buf[0]) { sink = 0; } return 0; }