aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/alias_index.zc
blob: 3c036fe9369e5f1e2e80513087eea19c478dbb29 (plain) (blame)
1
2
3
4
5
6
7
8
9
// expect: c: used after it was given away
fn main() {
	int** list = new(int*, 2);
	int* item = new(int);
	list[1] = item;
	int* c = list[1];
	free(d*list);
	return c[0];
}