mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -37,16 +37,13 @@ namespace solidity::frontend
|
||||
NameAndTypeResolver::NameAndTypeResolver(
|
||||
GlobalContext& _globalContext,
|
||||
langutil::EVMVersion _evmVersion,
|
||||
map<ASTNode const*, shared_ptr<DeclarationContainer>>& _scopes,
|
||||
ErrorReporter& _errorReporter
|
||||
):
|
||||
m_scopes(_scopes),
|
||||
m_evmVersion(_evmVersion),
|
||||
m_errorReporter(_errorReporter),
|
||||
m_globalContext(_globalContext)
|
||||
{
|
||||
if (!m_scopes[nullptr])
|
||||
m_scopes[nullptr] = make_shared<DeclarationContainer>();
|
||||
m_scopes[nullptr] = make_shared<DeclarationContainer>();
|
||||
for (Declaration const* declaration: _globalContext.declarations())
|
||||
{
|
||||
solAssert(m_scopes[nullptr]->registerDeclaration(*declaration), "Unable to register global declaration.");
|
||||
|
||||
@@ -56,7 +56,6 @@ public:
|
||||
NameAndTypeResolver(
|
||||
GlobalContext& _globalContext,
|
||||
langutil::EVMVersion _evmVersion,
|
||||
std::map<ASTNode const*, std::shared_ptr<DeclarationContainer>>& _scopes,
|
||||
langutil::ErrorReporter& _errorReporter
|
||||
);
|
||||
/// Registers all declarations found in the AST node, usually a source unit.
|
||||
@@ -123,7 +122,7 @@ private:
|
||||
/// where nullptr denotes the global scope. Note that structs are not scope since they do
|
||||
/// not contain code.
|
||||
/// Aliases (for example `import "x" as y;`) create multiple pointers to the same scope.
|
||||
std::map<ASTNode const*, std::shared_ptr<DeclarationContainer>>& m_scopes;
|
||||
std::map<ASTNode const*, std::shared_ptr<DeclarationContainer>> m_scopes;
|
||||
|
||||
langutil::EVMVersion m_evmVersion;
|
||||
DeclarationContainer* m_currentScope = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user