Make super unavailable in libraries.

This commit is contained in:
chriseth
2020-12-07 13:59:50 +01:00
parent c996d74041
commit b86c91d1a3
4 changed files with 17 additions and 1 deletions
+2 -1
View File
@@ -285,7 +285,8 @@ bool NameAndTypeResolver::resolveNamesAndTypesInternal(ASTNode& _node, bool _res
solAssert(_resolveInsideCode, "");
m_globalContext.setCurrentContract(*contract);
updateDeclaration(*m_globalContext.currentSuper());
if (!contract->isLibrary())
updateDeclaration(*m_globalContext.currentSuper());
updateDeclaration(*m_globalContext.currentThis());
for (ASTPointer<InheritanceSpecifier> const& baseContract: contract->baseContracts())