Show named argument name in error

This commit is contained in:
Alex Beregszaszi 2018-05-23 15:10:28 +02:00
parent 59b35fa5b2
commit 0f572159ec
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ Bugfixes:
Features:
* Type Checker: Show named argument in case of error.
Bugfixes:

View File

@ -1918,7 +1918,7 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
if (!found)
m_errorReporter.typeError(
_functionCall.location(),
"Named argument does not match function declaration."
"Named argument \"" + *argumentNames[i] + "\" does not match function declaration."
);
}
}

View File

@ -8,4 +8,4 @@ contract test {
}
// ----
// Warning: (31-37): This declaration shadows an existing declaration.
// TypeError: (153-168): Named argument does not match function declaration.
// TypeError: (153-168): Named argument "c" does not match function declaration.