You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comparing a NamedTuple with a UnionType of NamedTuple types fails because the union type seems to match NamedTuple in NamedTuple#==(other : NamedTuple), but does not respond to keys method used in the macro code of NamedTuple#compare_with_other_named_tuple.
in /usr/lib/crystal/named_tuple.cr:459: undefined method 'keys' for TypeNode of type (NamedTuple(bar: Nil) | NamedTuple(foo: Nil)) (must be a named tuple type)
{% if T.keys.sort == U.keys.sort %}
Same result for 0.23.1 and master.
The text was updated successfully, but these errors were encountered:
Comparing a NamedTuple with a UnionType of NamedTuple types fails because the union type seems to match NamedTuple in
NamedTuple#==(other : NamedTuple)
, but does not respond tokeys
method used in the macro code ofNamedTuple#compare_with_other_named_tuple
.Example:
carc.in
The above code fails with
Same result for 0.23.1 and master.
The text was updated successfully, but these errors were encountered: