mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Provide nicer error message when referencing overloaded references
This commit is contained in:
parent
863778fe36
commit
3c791d637d
@ -73,6 +73,7 @@ Language Features:
|
||||
|
||||
Compiler Features:
|
||||
* C API (``libsolc``): Export the ``solidity_license``, ``solidity_version`` and ``solidity_compile`` methods.
|
||||
* Type Checker: Nicer error message when trying to reference overloaded identifiers in inline assembly.
|
||||
* Type Checker: Show named argument in case of error.
|
||||
* Tests: Determine transaction status during IPC calls.
|
||||
* Code Generator: Allocate and free local variables according to their scope.
|
||||
|
@ -264,7 +264,10 @@ bool ReferencesResolver::visit(InlineAssembly const& _inlineAssembly)
|
||||
declarations = m_resolver.nameFromCurrentScope(realName);
|
||||
}
|
||||
if (declarations.size() != 1)
|
||||
{
|
||||
declarationError(_identifier.location, "Multiple matching identifiers. Resolving overloaded identifiers is not supported.");
|
||||
return size_t(-1);
|
||||
}
|
||||
if (auto var = dynamic_cast<VariableDeclaration const*>(declarations.front()))
|
||||
if (var->isLocalVariable() && _crossesFunctionBoundary)
|
||||
{
|
||||
|
@ -0,0 +1,11 @@
|
||||
contract C {
|
||||
function f() pure public {}
|
||||
function f(address) pure public {}
|
||||
function g() pure public {
|
||||
assembly {
|
||||
let x := f
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError: (155-156): Multiple matching identifiers. Resolving overloaded identifiers is not supported.
|
Loading…
Reference in New Issue
Block a user