Skip to content

Commit

Permalink
Type classes currently cannot take type parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
cameel committed Oct 30, 2023
1 parent 4df431d commit bbc85f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libsolidity/experimental/analysis/TypeInference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,10 @@ experimental::Type TypeInference::handleIdentifierByReferencedDeclaration(langut
else if (dynamic_cast<FunctionDefinition const*>(&_declaration))
return polymorphicInstance(*declarationAnnotation.type);
else if (dynamic_cast<TypeClassDefinition const*>(&_declaration))
return polymorphicInstance(*declarationAnnotation.type);
{
solAssert(TypeEnvironmentHelpers{*m_env}.typeVars(*declarationAnnotation.type).empty());
return *declarationAnnotation.type;
}
else if (dynamic_cast<TypeDefinition const*>(&_declaration))
{
// TODO: can we avoid this?
Expand Down

0 comments on commit bbc85f0

Please sign in to comment.