From 2cf8ebe95610cee79e129f0b5fb5de85f431f774 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Fri, 25 Sep 2015 15:40:17 -0700 Subject: [PATCH] Fix bug in mismatched arg name checker --- dsymbol | 2 +- src/analysis/mismatched_args.d | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dsymbol b/dsymbol index fd3a0df..1ac138f 160000 --- a/dsymbol +++ b/dsymbol @@ -1 +1 @@ -Subproject commit fd3a0dff1b6759e730119ef10c8eff04d4adf585 +Subproject commit 1ac138f58fe24d59519a5a92758701e9007d0ad6 diff --git a/src/analysis/mismatched_args.d b/src/analysis/mismatched_args.d index bb88d60..965d25c 100644 --- a/src/analysis/mismatched_args.d +++ b/src/analysis/mismatched_args.d @@ -33,7 +33,9 @@ final class MismatchedArgumentCheck : BaseAnalyzer const(DSymbol)* sym = resolveSymbol(sc, identVisitor.names.length > 0 ? identVisitor.names : [CONSTRUCTOR_SYMBOL_NAME]); - const istring[] params = sym is null ? [] : sym.opSlice().map!(a => cast() a.name).array(); + // The cast is a hack because .array() confuses the compiler's overload + // resolution code. + const(istring)[] params = sym is null ? [] : sym.argNames[].map!(a => cast() a).array(); const ArgMismatch[] mismatches = compareArgsToParams(params, args); foreach (size_t i, ref const mm; mismatches) addErrorMessage(argVisitor.lines[i], argVisitor.columns[i], KEY,