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

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Apr 13 14:56:11 AEST 2021


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"?

Zoltan.


More information about the reviews mailing list