Skip to content

Commit

Permalink
TypeSystem::resolveRecursive(): Fix unresolved type variables being r…
Browse files Browse the repository at this point in the history
…eturned
  • Loading branch information
cameel committed Oct 30, 2023
1 parent f8fd4f2 commit 9ac8ba4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libsolidity/experimental/ast/TypeSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,19 +195,19 @@ experimental::Type TypeEnvironment::resolve(Type _type) const
experimental::Type TypeEnvironment::resolveRecursive(Type _type) const
{
return std::visit(util::GenericVisitor{
[&](TypeConstant const& _type) -> Type {
[&](TypeConstant const& _typeConstant) -> Type {
return TypeConstant{
_type.constructor,
_type.arguments | ranges::views::transform([&](Type _argType) {
_typeConstant.constructor,
_typeConstant.arguments | ranges::views::transform([&](Type const& _argType) {
return resolveRecursive(_argType);
}) | ranges::to<std::vector<Type>>
};
},
[&](TypeVariable const&) -> Type {
return _type;
[](TypeVariable const& _typeVar) -> Type {
return _typeVar;
},
[&](std::monostate) -> Type {
return _type;
[](std::monostate _nothing) -> Type {
return _nothing;
}
}, resolve(_type));
}
Expand Down

0 comments on commit 9ac8ba4

Please sign in to comment.