mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds missing accepts to ImportDirective's SymbolAlias::symbol
This commit is contained in:
parent
e2fe14b0e4
commit
f5ff358add
@ -571,7 +571,8 @@ bool DeclarationRegistrationHelper::visit(ImportDirective& _import)
|
||||
if (!m_scopes[importee])
|
||||
m_scopes[importee] = make_shared<DeclarationContainer>(nullptr, m_scopes[nullptr].get());
|
||||
m_scopes[&_import] = m_scopes[importee];
|
||||
return ASTVisitor::visit(_import);
|
||||
ASTVisitor::visit(_import);
|
||||
return false; // Do not recurse into child nodes (Identifier for symbolAliases)
|
||||
}
|
||||
|
||||
bool DeclarationRegistrationHelper::visit(ContractDefinition& _contract)
|
||||
|
@ -58,13 +58,19 @@ void PragmaDirective::accept(ASTConstVisitor& _visitor) const
|
||||
|
||||
void ImportDirective::accept(ASTVisitor& _visitor)
|
||||
{
|
||||
_visitor.visit(*this);
|
||||
if (_visitor.visit(*this))
|
||||
for (SymbolAlias const& symbolAlias: symbolAliases())
|
||||
if (symbolAlias.symbol)
|
||||
symbolAlias.symbol->accept(_visitor);
|
||||
_visitor.endVisit(*this);
|
||||
}
|
||||
|
||||
void ImportDirective::accept(ASTConstVisitor& _visitor) const
|
||||
{
|
||||
_visitor.visit(*this);
|
||||
if (_visitor.visit(*this))
|
||||
for (SymbolAlias const& symbolAlias: symbolAliases())
|
||||
if (symbolAlias.symbol)
|
||||
symbolAlias.symbol->accept(_visitor);
|
||||
_visitor.endVisit(*this);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user