mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix wrong name used in error message when reporting invalid named argument
This commit is contained in:
parent
4045f41c8d
commit
aae640dd3a
@ -19,6 +19,7 @@ Compiler Features:
|
||||
Bugfixes:
|
||||
* Code generator: Fix internal error on stripping dynamic types from return parameters on EVM versions without ``RETURNDATACOPY``.
|
||||
* Type Checker: Disallow ``virtual`` for modifiers in libraries.
|
||||
* Type Checker: Correct the error message for invalid named parameter in a call to refer to the right argument.
|
||||
* Type Checker: Correct the warning for homonymous, but not shadowing declarations.
|
||||
* ViewPureChecker: Prevent visibility check on constructors.
|
||||
* Type system: Fix internal error on implicit conversion of contract instance to the type of its ``super``.
|
||||
|
@ -2091,18 +2091,17 @@ void TypeChecker::typeCheckFunctionGeneralChecks(
|
||||
{
|
||||
bool not_all_mapped = false;
|
||||
|
||||
for (size_t i = 0; i < paramArgMap.size(); i++)
|
||||
for (size_t i = 0; i < argumentNames.size(); i++)
|
||||
{
|
||||
size_t j;
|
||||
for (j = 0; j < argumentNames.size(); j++)
|
||||
if (parameterNames[i] == *argumentNames[j])
|
||||
for (j = 0; j < parameterNames.size(); j++)
|
||||
if (parameterNames[j] == *argumentNames[i])
|
||||
break;
|
||||
|
||||
if (j < argumentNames.size())
|
||||
paramArgMap[i] = arguments[j].get();
|
||||
if (j < parameterNames.size())
|
||||
paramArgMap[j] = arguments[i].get();
|
||||
else
|
||||
{
|
||||
paramArgMap[i] = nullptr;
|
||||
not_all_mapped = true;
|
||||
m_errorReporter.typeError(
|
||||
4974_error,
|
||||
|
@ -10,4 +10,4 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4974: (249-288): Named argument "a" does not match function declaration.
|
||||
// TypeError 4974: (249-288): Named argument "x" does not match function declaration.
|
||||
|
Loading…
Reference in New Issue
Block a user