Refactor function override check to remove duplicate logic

This commit is contained in:
Federico Bond
2017-08-11 22:45:25 +01:00
committed by Alex Beregszaszi
parent f0dc572055
commit a6949851f3
2 changed files with 50 additions and 47 deletions
+2 -3
View File
@@ -62,6 +62,8 @@ private:
/// arguments and that there is at most one constructor.
void checkContractDuplicateFunctions(ContractDefinition const& _contract);
void checkContractIllegalOverrides(ContractDefinition const& _contract);
/// Reports a type error with an appropiate message if overriden function signature differs.
void checkFunctionOverride(FunctionDefinition const& function, FunctionDefinition const& super);
void checkContractAbstractFunctions(ContractDefinition const& _contract);
void checkContractAbstractConstructors(ContractDefinition const& _contract);
/// Checks that different functions with external visibility end up having different
@@ -120,9 +122,6 @@ private:
/// Runs type checks on @a _expression to infer its type and then checks that it is an LValue.
void requireLValue(Expression const& _expression);
/// Reports a type error with an appropiate message when overriden function signature differs.
void overrideTypeError(FunctionDefinition const& function, FunctionDefinition const& super);
ContractDefinition const* m_scope = nullptr;
ErrorReporter& m_errorReporter;