aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/stmt_block_scope.zc
blob: 3b6fd6eceae8d60841a7ff9e03e9cb9c6f585e79 (plain) (blame)
1
2
3
4
5
// expect: 3/1/
// spec 4.2: { ... } is a block with its own scope
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int a = 1; { int a = 3; pn(a); } pn(a); return 0; }