Require unimplemented functions to be virtual.

This commit is contained in:
Daniel Kirchner
2019-12-02 21:59:00 +01:00
parent 958ec98cbe
commit 05baa23e8a
44 changed files with 123 additions and 118 deletions
+2
View File
@@ -433,6 +433,8 @@ bool TypeChecker::visit(FunctionDefinition const& _function)
m_errorReporter.typeError(_function.location(), "Constructor must be implemented if declared.");
else if (isLibraryFunction)
m_errorReporter.typeError(_function.location(), "Library functions must be implemented if declared.");
else if (!_function.virtualSemantics())
m_errorReporter.typeError(_function.location(), "Functions without implementation must be marked virtual.");
if (_function.isFallback())