diff --git a/libsolidity/experimental/analysis/TypeInference.cpp b/libsolidity/experimental/analysis/TypeInference.cpp index fded26b75..1d8dd1d03 100644 --- a/libsolidity/experimental/analysis/TypeInference.cpp +++ b/libsolidity/experimental/analysis/TypeInference.cpp @@ -557,6 +557,9 @@ bool TypeInference::visit(TypeClassInstantiation const& _typeClassInstantiation) [&](ASTPointer _typeClassName) -> std::optional { if (auto const* typeClassDefinition = dynamic_cast(_typeClassName->annotation().referencedDeclaration)) { + // visiting the type class will re-visit this instantiation + typeClassDefinition->accept(*this); + // TODO: more error handling? Should be covered by the visit above. solAssert(m_analysis.annotation(*typeClassDefinition).typeClass.has_value()); return m_analysis.annotation(*typeClassDefinition).typeClass.value();