aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/9-appendix-b/b2_12_as_int_star.zc
blob: da548026f0a2868c29b7149a79a6bd5579fa461b (plain) (blame)
1
2
3
4
5
6
// expect error: expected ')', found 'y'
// spec 3.2.3 and appendix b.2.12: the type after as is read greedily, so x as int * y reads int* and then fails; write (x as int) * y
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int x = 2; int y = 3; pn(x as int * y); return 0; }
// zc0: error