aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-17 00:50:10 +0800
committerChristian <c@ethdev.com>2015-01-20 06:35:04 +0800
commit6633fbb6030cda64bd5c16ac5d59bbaad71967b2 (patch)
tree15ae7276771ee534c0665a0dbfd7e0a445336c82 /AST.h
parent914fcedd0e2217300ee28f13bc4c006860f81a12 (diff)
downloaddexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.gz
dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.tar.zst
dexon-solidity-6633fbb6030cda64bd5c16ac5d59bbaad71967b2.zip
Check overrides and provide inherited public interface.
Diffstat (limited to 'AST.h')
-rwxr-xr-xAST.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/AST.h b/AST.h
index b3fd840a..e8bc7f6a 100755
--- a/AST.h
+++ b/AST.h
@@ -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