aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/alias_index.zc
blob: 11ce57c38601a7317d4ea05ea2eb0489d1ee254f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
namespace;
include rt;

// expect: c: used after it was given away
fn main() {
	int** list = rt.new(int*, 2);
	int* item = rt.new(int);
	list[1] = item;
	int* c = list[1];
	rt.free(d*list);
	return c[0];
}