From 47e42430f27c579e09157f3373238e3bbe8ab93e Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 10 Sep 2015 17:17:13 +0200 Subject: added type check if the type of the var decl is one of base contract type --- libsolidity/AST.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libsolidity/AST.h') diff --git a/libsolidity/AST.h b/libsolidity/AST.h index 6068e756..1288b5d3 100644 --- a/libsolidity/AST.h +++ b/libsolidity/AST.h @@ -1257,7 +1257,7 @@ public: ) { m_referencedDeclaration = &_referencedDeclaration; - m_currentContract = _currentContract; + m_contractScope = _currentContract; } Declaration const& referencedDeclaration() const; @@ -1273,6 +1273,8 @@ public: /// argument types in a call context. void overloadResolution(TypePointers const& _argumentTypes); + ContractDefinition const* contractScope() { return m_contractScope; } + private: ASTPointer m_name; @@ -1280,7 +1282,7 @@ private: Declaration const* m_referencedDeclaration = nullptr; /// Stores a reference to the current contract. This is needed because types of base contracts /// change depending on the context. - ContractDefinition const* m_currentContract = nullptr; + ContractDefinition const* m_contractScope = nullptr; /// A vector of overloaded declarations, right now only FunctionDefinition has overloaded declarations. std::vector m_overloadedDeclarations; }; -- cgit