Fix false positive in builtin property name checker

This commit is contained in:
Hackerpilot 2014-08-22 14:32:12 -07:00
parent abd6409519
commit 75970e5e57
1 changed files with 8 additions and 0 deletions

View File

@ -45,6 +45,14 @@ class BuiltinPropertyNameCheck : BaseAnalyzer
fd.accept(this); fd.accept(this);
} }
override void visit(const FunctionBody functionBody)
{
int d = depth;
scope(exit) depth = d;
depth = 0;
functionBody.accept(this);
}
override void visit(const AutoDeclaration ad) override void visit(const AutoDeclaration ad)
{ {
if (depth > 0) foreach (i; ad.identifiers) if (depth > 0) foreach (i; ad.identifiers)