From 6633fbb6030cda64bd5c16ac5d59bbaad71967b2 Mon Sep 17 00:00:00 2001 From: Christian Date: Fri, 16 Jan 2015 17:50:10 +0100 Subject: Check overrides and provide inherited public interface. --- AST.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'AST.h') 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> const& getStateVariables() const { return m_stateVariables; } std::vector> 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, FunctionDefinition const*>> getInterfaceFunctionList() const; + void checkIllegalOverrides() const; + + std::vector, FunctionDefinition const*>> const& getInterfaceFunctionList() const; std::vector> m_baseContracts; std::vector> m_definedStructs; @@ -208,6 +210,7 @@ private: ASTPointer m_documentation; std::vector m_linearizedBaseContracts; + mutable std::unique_ptr, FunctionDefinition const*>>> m_interfaceFunctionList; }; class StructDefinition: public Declaration -- cgit