diff options
author | LianaHus <liana@ethdev.com> | 2015-09-10 23:17:13 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-09-10 23:17:13 +0800 |
commit | 47e42430f27c579e09157f3373238e3bbe8ab93e (patch) | |
tree | 39fdc6752502ecd44d0f92362f053cf1e1295b63 /libsolidity/AST.h | |
parent | 30e89b3d9a85d7dba3e9858a19b3495e9c8f759a (diff) | |
download | dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.tar dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.tar.gz dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.tar.bz2 dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.tar.lz dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.tar.xz dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.tar.zst dexon-solidity-47e42430f27c579e09157f3373238e3bbe8ab93e.zip |
added type check if the type of the var decl is one of base contract type
Diffstat (limited to 'libsolidity/AST.h')
-rw-r--r-- | libsolidity/AST.h | 6 |
1 files changed, 4 insertions, 2 deletions
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<ASTString> 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<Declaration const*> m_overloadedDeclarations; }; |