aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/temporary_output.zc
blob: 02a8a07f1edaa9f8ee2b4658ed9a77fed254090c (plain) (blame)
1
2
3
4
5
6
7
8
9
// expect: a new object can only go straight to a d parameter; bind it to a name first
char*.u make_text(int n) {
	let text = new(char, n);
	return u*text;
}
fn main() {
	put_s(make_text(3));
	return 0;
}