[m-rev.] for review: Make type_range also succeed for discontiguous range of enum values.

Peter Wang novalazy at gmail.com
Tue Apr 13 15:08:12 AEST 2021


On Tue, 13 Apr 2021 14:56:11 +1000 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> 
> 2021-04-13 14:41 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
> 
> That diff looks good, just one nit:
> 
> > +extend_ctor_repn_int_tag_range(CtorRepn, !Min, !Max) :-
> >     ConsTag = CtorRepn ^ cr_tag,
> >     get_int_tag(ConsTag, Int),
> > -    ranges.insert(Int, !Ranges).
> > +    int.min(Int, !Min),
> > +    int.max(Int, !Max).
> 
> Many invocations of this predicate will leave both min and max untouched,
> so I would use a word other than "extend" here. Maybe "add to", or "include in"?

All right, I'll change it to "add to". Thanks for the review.

Peter


More information about the reviews mailing list