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

// expect: x: is not an owner, so it can't be stored in a global
struct box { int* v; };
let g;
fn main() { box* b = rt.new(box); int* x = rt.new(int); b.v = x; g = x; return 0; }