aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/6-ownership/free_then_reassign.zc
blob: 5ebc6933aa2be4660b09078f96b7548556f70049 (plain) (blame)
1
2
3
4
5
6
// expect: 7/
// spec 6.8.5
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int* a = rt.new(1); a[0] = 1; int* b = rt.new(1); b[0] = 7; rt.free(a); a = b; pn(a[0]); return 0; }
// zc0: skip