mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixed the test
This commit is contained in:
parent
495d827ece
commit
e7568b5f4d
@ -130,12 +130,14 @@ vector<Declaration const*> NameAndTypeResolver::getNameFromCurrentScope(ASTStrin
|
||||
return m_currentScope->resolveName(_name, _recursive);
|
||||
}
|
||||
|
||||
vector<Declaration const*> NameAndTypeResolver::cleanupedDeclarations(Identifier const& _identifier)
|
||||
vector<Declaration const*> NameAndTypeResolver::cleanupedDeclarations(
|
||||
Identifier const& _identifier,
|
||||
vector<Declaration const*> const& _declarations
|
||||
)
|
||||
{
|
||||
vector<Declaration const*> uniqueFunctions;
|
||||
|
||||
auto declarations = m_currentScope->resolveName(_identifier.getName());
|
||||
for (auto it = declarations.begin(); it != declarations.end(); ++it)
|
||||
for (auto it = _declarations.begin(); it != _declarations.end(); ++it)
|
||||
{
|
||||
solAssert(*it, "");
|
||||
// the declaration is functionDefinition while declarations > 1
|
||||
@ -480,7 +482,7 @@ bool ReferencesResolver::visit(Identifier& _identifier)
|
||||
else if (declarations.size() == 1)
|
||||
_identifier.setReferencedDeclaration(*declarations.front(), m_currentContract);
|
||||
else
|
||||
_identifier.setOverloadedDeclarations(m_resolver.cleanupedDeclarations(_identifier));
|
||||
_identifier.setOverloadedDeclarations(m_resolver.cleanupedDeclarations(_identifier, declarations));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
/// resolving phase.
|
||||
std::vector<Declaration const*> getNameFromCurrentScope(ASTString const& _name, bool _recursive = true);
|
||||
|
||||
std::vector<Declaration const*> cleanupedDeclarations(Identifier const& _identifier);
|
||||
std::vector<Declaration const*> cleanupedDeclarations(Identifier const& _identifier, std::vector<Declaration const*> const& _declarations);
|
||||
|
||||
private:
|
||||
void reset();
|
||||
|
Loading…
Reference in New Issue
Block a user