Implement and fix overriding unimplemented and implemented functions with unimplemented functions.

This commit is contained in:
Daniel Kirchner
2019-12-05 09:26:43 +01:00
committed by chriseth
parent 2c72ee7017
commit 426f04b389
5 changed files with 37 additions and 33 deletions
+4 -4
View File
@@ -70,10 +70,10 @@ private:
template <class T>
void findDuplicateDefinitions(std::map<std::string, std::vector<T>> const& _definitions, std::string _message);
void checkIllegalOverrides(ContractDefinition const& _contract);
/// Returns false and reports a type error with an appropriate
/// message if overridden function signature differs.
/// Also stores the direct super function in the AST annotations.
bool checkFunctionOverride(FunctionDefinition const& _function, FunctionDefinition const& _super);
/// Performs various checks related to @a _function overriding @a _super like
/// different return type, invalid visibility change, etc.
/// Also stores @a _super as a base function of @a _function in its AST annotations.
void checkFunctionOverride(FunctionDefinition const& _function, FunctionDefinition const& _super);
void overrideListError(FunctionDefinition const& function, std::set<ContractDefinition const*, LessFunction> _secondary, std::string const& _message1, std::string const& _message2);
void overrideError(CallableDeclaration const& function, CallableDeclaration const& super, std::string message, std::string secondaryMsg = "Overridden function is here:");
void checkAbstractFunctions(ContractDefinition const& _contract);