aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/decl_shadow_global.zc
blob: 279c0631a650e03c52f09e609633d066a6adde40 (plain) (blame)
1
2
3
4
5
6
// expect: 2/1/
// spec 4.1.6: a local may shadow a global
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
int g = 1;
fn main() { int g = 2; pn(g); pn(1); return 0; }