Fix segfault
This commit is contained in:
parent
e0dc18a8b5
commit
fd60696a24
|
@ -40,11 +40,10 @@ class UnusedVariableCheck : BaseAnalyzer
|
||||||
override void visit(const FunctionDeclaration functionDec)
|
override void visit(const FunctionDeclaration functionDec)
|
||||||
{
|
{
|
||||||
pushScope();
|
pushScope();
|
||||||
if (isOverride)
|
if (functionDec.functionBody !is null)
|
||||||
functionDec.functionBody.accept(this);
|
|
||||||
else if (functionDec.functionBody !is null)
|
|
||||||
{
|
{
|
||||||
functionDec.parameters.accept(this);
|
if (!isOverride)
|
||||||
|
functionDec.parameters.accept(this);
|
||||||
functionDec.functionBody.accept(this);
|
functionDec.functionBody.accept(this);
|
||||||
}
|
}
|
||||||
popScope();
|
popScope();
|
||||||
|
|
Loading…
Reference in New Issue