aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/decl_redeclare_same_block.zc
blob: e593fb722c16b776cf3837794ceaec7d0b192fcc (plain) (blame)
1
2
3
4
5
// expect: 2/
// spec 4.1.6: redeclaring a name in the same block is accepted and the new one hides the old one
include rt;
void pn(int x) { rt.put_n(x); rt.put_c(10); }
fn main() { int a = 1; int a = 2; pn(a); return 0; }