From 50995455469d412b483ff5cc01ccd9dca4ec5ad1 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 4 Feb 2016 15:18:49 -0800 Subject: [PATCH] Fix #305 --- libdparse | 2 +- src/analysis/mismatched_args.d | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/libdparse b/libdparse index 4bcc25d..07e7362 160000 --- a/libdparse +++ b/libdparse @@ -1 +1 @@ -Subproject commit 4bcc25da4564957fa714ae05151851cc84f67eb1 +Subproject commit 07e73629cbe8c4253cd0c0af6b9951761b82f608 diff --git a/src/analysis/mismatched_args.d b/src/analysis/mismatched_args.d index a84c319..8411d9d 100644 --- a/src/analysis/mismatched_args.d +++ b/src/analysis/mismatched_args.d @@ -29,7 +29,10 @@ final class MismatchedArgumentCheck : BaseAnalyzer const istring[] args = argVisitor.args; auto identVisitor = scoped!IdentVisitor; - identVisitor.visit(fce.unaryExpression); + if (fce.unaryExpression !is null) + identVisitor.visit(fce.unaryExpression); + else if (fce.type !is null) + identVisitor.visit(fce.type); const(DSymbol)*[] symbols = resolveSymbol(sc, identVisitor.names.length > 0 ? identVisitor.names : [CONSTRUCTOR_SYMBOL_NAME]);