From fd60696a24673ecfe478bd4e297b9dc72a202580 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Mon, 12 May 2014 16:39:59 -0700 Subject: [PATCH] Fix segfault --- analysis/unused.d | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/analysis/unused.d b/analysis/unused.d index faa73b8..e7922d9 100644 --- a/analysis/unused.d +++ b/analysis/unused.d @@ -40,11 +40,10 @@ class UnusedVariableCheck : BaseAnalyzer override void visit(const FunctionDeclaration functionDec) { pushScope(); - if (isOverride) - functionDec.functionBody.accept(this); - else if (functionDec.functionBody !is null) + if (functionDec.functionBody !is null) { - functionDec.parameters.accept(this); + if (!isOverride) + functionDec.parameters.accept(this); functionDec.functionBody.accept(this); } popScope();