Fix bug in mismatched arg name checker
This commit is contained in:
parent
ec14694db1
commit
2cf8ebe956
2
dsymbol
2
dsymbol
|
@ -1 +1 @@
|
|||
Subproject commit fd3a0dff1b6759e730119ef10c8eff04d4adf585
|
||||
Subproject commit 1ac138f58fe24d59519a5a92758701e9007d0ad6
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue