aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/6-ownership/lend_to_global_open.zc
blob: 7ef3a2b56e6ab0d1b206b22bb5b7414455dd44b2 (plain) (blame)
1
2
3
4
5
6
7
// expect error: x: is lent to global g
// spec 6.11
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
int* g;
fn main() { int* x = rt.new(1); x[0] = 5; g = m*x; return 0; }
// zc0: skip