mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4241 from ethereum/show-named-arg
Show named argument name in error
This commit is contained in:
commit
24ca596c66
@ -20,7 +20,7 @@ Bugfixes:
|
|||||||
|
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
* Type Checker: Show named argument in case of error.
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|
||||||
|
@ -1918,7 +1918,7 @@ bool TypeChecker::visit(FunctionCall const& _functionCall)
|
|||||||
if (!found)
|
if (!found)
|
||||||
m_errorReporter.typeError(
|
m_errorReporter.typeError(
|
||||||
_functionCall.location(),
|
_functionCall.location(),
|
||||||
"Named argument does not match function declaration."
|
"Named argument \"" + *argumentNames[i] + "\" does not match function declaration."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,4 +8,4 @@ contract test {
|
|||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// Warning: (31-37): This declaration shadows an existing declaration.
|
// 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user