Add override exception for interface functions.

This commit is contained in:
chriseth
2021-08-31 10:45:31 +02:00
parent 78afd71ab7
commit f7916f2940
22 changed files with 83 additions and 38 deletions
+3 -2
View File
@@ -86,7 +86,8 @@ private:
int currentNode = static_cast<int>(numNodes++);
nodes[_function] = currentNode;
nodeInv[currentNode] = _function;
if (_function.overrides())
if (!_function.baseFunctions().empty())
for (auto const& baseFunction: _function.baseFunctions())
addEdge(currentNode, visit(baseFunction));
else
@@ -518,7 +519,7 @@ void OverrideChecker::checkOverride(OverrideProxy const& _overriding, OverridePr
"Override changes modifier signature."
);
if (!_overriding.overrides())
if (!_overriding.overrides() && !(_super.isFunction() && _super.contract().isInterface()))
overrideError(
_overriding,
_super,