aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/lend_unrestored.zc
blob: 1b316dfcc63f142f082f8c10af54712a3d30708d (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; buf[0] = 1; return 0; }