Skip to content

Commit

Permalink
Merge pull request #4019 from mihails-strasuns-sociomantic/di-shadowi…
Browse files Browse the repository at this point in the history
…ng-ignored

[D1] fix issue 13521 : -di ignores variable shadowing
  • Loading branch information
WalterBright committed Sep 23, 2014
2 parents db46c17 + 595ba03 commit d82522f
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 d82522f

Please sign in to comment.