Don't prohibit interface inheritance

This commit is contained in:
Jason Cobb 2020-01-02 16:27:32 -05:00
parent 29d7c7d065
commit 1cc8ce1656
No known key found for this signature in database
GPG Key ID: 2A3F6A6DCA1E8DED

View File

@ -237,9 +237,6 @@ void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance)
auto base = dynamic_cast<ContractDefinition const*>(&dereference(_inheritance.name())); auto base = dynamic_cast<ContractDefinition const*>(&dereference(_inheritance.name()));
solAssert(base, "Base contract not available."); solAssert(base, "Base contract not available.");
if (m_scope->isInterface())
m_errorReporter.typeError(_inheritance.location(), "Interfaces cannot inherit.");
if (base->isLibrary()) if (base->isLibrary())
m_errorReporter.typeError(_inheritance.location(), "Libraries cannot be inherited from."); m_errorReporter.typeError(_inheritance.location(), "Libraries cannot be inherited from.");