Skip to content

Commit 649079a

Browse files
committed
fixup! Type inference draft.
1 parent 48eb639 commit 649079a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: libsolidity/experimental/ast/TypeSystem.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,19 @@ experimental::Type TypeEnvironment::resolve(Type _type) const
199199
experimental::Type TypeEnvironment::resolveRecursive(Type _type) const
200200
{
201201
return std::visit(util::GenericVisitor{
202-
[&](TypeConstant const& _type) -> Type {
202+
[&](TypeConstant const& _typeConstant) -> Type {
203203
return TypeConstant{
204-
_type.constructor,
205-
_type.arguments | ranges::views::transform([&](Type const& _argType) {
204+
_typeConstant.constructor,
205+
_typeConstant.arguments | ranges::views::transform([&](Type const& _argType) {
206206
return resolveRecursive(_argType);
207207
}) | ranges::to<std::vector<Type>>
208208
};
209209
},
210-
[&](TypeVariable const&) -> Type {
211-
return _type;
210+
[](TypeVariable const& _typeVar) -> Type {
211+
return _typeVar;
212212
},
213-
[&](std::monostate) -> Type {
214-
return _type;
213+
[](std::monostate const& _nothing) -> Type {
214+
return _nothing;
215215
}
216216
}, resolve(_type));
217217
}

0 commit comments

Comments
 (0)