Merge pull request #10506 from ethereum/superInLibs

Make super unavailable in libraries.
This commit is contained in:
chriseth
2020-12-07 14:36:42 +01:00
committed by GitHub
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())