aboutsummaryrefslogtreecommitdiffstats
path: root/NameAndTypeResolver.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-05-08 00:12:58 +0800
committerLiana Husikyan <liana@ethdev.com>2015-05-08 23:51:53 +0800
commite7568b5f4d7b07f5b36890852abce7d1b51f9124 (patch)
treecc758b7937e29c48da136ad1aed4f50ba73e9e41 /NameAndTypeResolver.cpp
parent495d827eceb2f8160421d0f7ce86d1183b54b3de (diff)
downloaddexon-solidity-e7568b5f4d7b07f5b36890852abce7d1b51f9124.tar.gz
dexon-solidity-e7568b5f4d7b07f5b36890852abce7d1b51f9124.tar.zst
dexon-solidity-e7568b5f4d7b07f5b36890852abce7d1b51f9124.zip
fixed the test
Diffstat (limited to 'NameAndTypeResolver.cpp')
-rw-r--r--NameAndTypeResolver.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/NameAndTypeResolver.cpp b/NameAndTypeResolver.cpp
index ac841fcc..21b33292 100644
--- a/NameAndTypeResolver.cpp
+++ b/NameAndTypeResolver.cpp
@@ -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;
}