Fix import directive visits in type checker and view pure checker.

This commit is contained in:
Daniel Kirchner
2022-03-14 14:53:06 +01:00
committed by chriseth
parent 3f6beaa0ad
commit 0f1a63c3fa
8 changed files with 37 additions and 0 deletions
+5
View File
@@ -268,6 +268,11 @@ TypePointers TypeChecker::typeCheckMetaTypeFunctionAndRetrieveReturnType(Functio
return {TypeProvider::meta(dynamic_cast<TypeType const&>(*firstArgType).actualType())};
}
bool TypeChecker::visit(ImportDirective const&)
{
return false;
}
void TypeChecker::endVisit(InheritanceSpecifier const& _inheritance)
{
auto base = dynamic_cast<ContractDefinition const*>(&dereference(_inheritance.name()));
+2
View File
@@ -125,6 +125,8 @@ private:
FunctionType const* _functionType
);
bool visit(ImportDirective const&) override;
void endVisit(InheritanceSpecifier const& _inheritance) override;
void endVisit(ModifierDefinition const& _modifier) override;
bool visit(FunctionDefinition const& _function) override;
+5
View File
@@ -134,6 +134,11 @@ bool ViewPureChecker::check()
return !m_errors;
}
bool ViewPureChecker::visit(ImportDirective const&)
{
return false;
}
bool ViewPureChecker::visit(FunctionDefinition const& _funDef)
{
solAssert(!m_currentFunction, "");
+2
View File
@@ -50,6 +50,8 @@ private:
langutil::SourceLocation location;
};
bool visit(ImportDirective const&) override;
bool visit(FunctionDefinition const& _funDef) override;
void endVisit(FunctionDefinition const& _funDef) override;
bool visit(ModifierDefinition const& _modifierDef) override;