diff options
author | Christian <c@ethdev.com> | 2015-01-17 00:50:10 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-20 06:35:04 +0800 |
commit | 6633fbb6030cda64bd5c16ac5d59bbaad71967b2 (patch) | |
tree | 15ae7276771ee534c0665a0dbfd7e0a445336c82 /AST.h | |
parent | 914fcedd0e2217300ee28f13bc4c006860f81a12 (diff) | |
download | dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.gz dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.bz2 dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.lz dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.xz dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.zst dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.zip |
Check overrides and provide inherited public interface.
Diffstat (limited to 'AST.h')
-rwxr-xr-x | AST.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -178,8 +178,8 @@ public: std::vector<ASTPointer<VariableDeclaration>> const& getStateVariables() const { return m_stateVariables; } std::vector<ASTPointer<FunctionDefinition>> const& getDefinedFunctions() const { return m_definedFunctions; } - /// Checks that the constructor does not have a "returns" statement and calls - /// checkTypeRequirements on all its functions. + /// Checks that there are no illegal overrides, that the constructor does not have a "returns" + /// and calls checkTypeRequirements on all its functions. void checkTypeRequirements(); /// @return A shared pointer of an ASTString. @@ -199,7 +199,9 @@ public: FunctionDefinition const* getConstructor() const; private: - std::vector<std::pair<FixedHash<4>, FunctionDefinition const*>> getInterfaceFunctionList() const; + void checkIllegalOverrides() const; + + std::vector<std::pair<FixedHash<4>, FunctionDefinition const*>> const& getInterfaceFunctionList() const; std::vector<ASTPointer<Identifier>> m_baseContracts; std::vector<ASTPointer<StructDefinition>> m_definedStructs; @@ -208,6 +210,7 @@ private: ASTPointer<ASTString> m_documentation; std::vector<ContractDefinition const*> m_linearizedBaseContracts; + mutable std::unique_ptr<std::vector<std::pair<FixedHash<4>, FunctionDefinition const*>>> m_interfaceFunctionList; }; class StructDefinition: public Declaration |