Closed sorawee closed 6 years ago
In https://github.com/brownplt/pyret-lang/blob/master/src/arr/compiler/type-check.arr#L997
variants-meet = cases(List<TypeMembers>) variant-type-fields: | empty => empty | link(first, rest) => cases(List<TypeMembers>) rest: | empty => first | link(_, _) => rest.foldr(meet-fields(_, _, l, context), first) end end extended-shared-field-types = variants-meet.fold-keys(lam(key, extended-shared-field-types): extended-shared-field-types.set(key, variants-meet.get-value(key)) end, initial-shared-field-types)
But this is clearly wrong -- the first branch of the case statement says variants-meet is a List, so it can't variants-meet.fold-keys
variants-meet
List
variants-meet.fold-keys
Minimal program:
data False: end
In https://github.com/brownplt/pyret-lang/blob/master/src/arr/compiler/type-check.arr#L997
But this is clearly wrong -- the first branch of the case statement says
variants-meet
is aList
, so it can'tvariants-meet.fold-keys