aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/CompilerStack.cpp3
-rw-r--r--libsolidity/interface/CompilerStack.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index 3335c40e..9d8d872f 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -88,6 +88,7 @@ void CompilerStack::reset(bool _keepSources)
m_optimize = false;
m_optimizeRuns = 200;
m_globalContext.reset();
+ m_scopes.clear();
m_sourceOrder.clear();
m_contracts.clear();
m_errors.clear();
@@ -165,7 +166,7 @@ bool CompilerStack::parse()
noErrors = false;
m_globalContext = make_shared<GlobalContext>();
- NameAndTypeResolver resolver(m_globalContext->declarations(), m_errors);
+ NameAndTypeResolver resolver(m_globalContext->declarations(), m_scopes, m_errors);
for (Source const* source: m_sourceOrder)
if (!resolver.registerDeclarations(*source->ast))
return false;
diff --git a/libsolidity/interface/CompilerStack.h b/libsolidity/interface/CompilerStack.h
index 9ee70215..eddfea68 100644
--- a/libsolidity/interface/CompilerStack.h
+++ b/libsolidity/interface/CompilerStack.h
@@ -52,6 +52,7 @@ namespace solidity
// forward declarations
class Scanner;
+class ASTNode;
class ContractDefinition;
class FunctionDefinition;
class SourceUnit;
@@ -59,6 +60,7 @@ class Compiler;
class GlobalContext;
class InterfaceHandler;
class Error;
+class DeclarationContainer;
enum class DocumentationType: uint8_t
{
@@ -271,6 +273,7 @@ private:
bool m_parseSuccessful;
std::map<std::string const, Source> m_sources;
std::shared_ptr<GlobalContext> m_globalContext;
+ std::map<ASTNode const*, std::shared_ptr<DeclarationContainer>> m_scopes;
std::vector<Source const*> m_sourceOrder;
std::map<std::string const, Contract> m_contracts;
std::string m_formalTranslation;