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

// expect: still owns an object; overwriting it would leak it
fn main() { word r = rt.new(4); { word n = rt.new(8); n[0] = 1; r = n; } r[0] = 2; return 0; }