Skip to content

Commit

Permalink
Fix issue 13521 : -di ignores variable shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihails Strasuns committed Sep 23, 2014
1 parent 709b169 commit 595ba03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/expression.c
Expand Up @@ -4733,7 +4733,7 @@ Expression *DeclarationExp::semantic(Scope *sc)
error("declaration %s is already defined in another scope in %s",
s->toPrettyChars(), sc->func->toChars());
}
else if (!global.params.useDeprecated)
else if (global.params.useDeprecated != 1)
{ // Disallow shadowing

for (Scope *scx = sc->enclosing; scx && scx->func == sc->func; scx = scx->enclosing)
Expand Down

0 comments on commit 595ba03

Please sign in to comment.