aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/if_branch_is_own_scope.zc
blob: d4f82eaf51d25772fd1ade7c18ac84764d676c68 (plain) (blame)
1
2
3
4
5
// expect error: q is used but never defined
// spec 4.3: each branch is its own block even without braces
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { if (1) int q = 5; pn(q); return 0; }