[m-rev.] [PATCH] Fix writing of coerce casts in .opt files.
Peter Wang
novalazy at gmail.com
Wed Feb 16 16:15:17 AEDT 2022
On Wed, 16 Feb 2022 16:13:16 +1100 Peter Wang <novalazy at gmail.com> wrote:
> This also belongs on the release branch.
> ----
>
> We inadventently wrote out 'coerce' casts in .opt files as:
>
> V_2 = 'coerce expression'(V_3).
>
> In commit 233874403fc1cdd70b8c92b121a07335f6c5436f, cast_type_to_string
> was changed to return "coerce expression" instead of simply "coerce"
> for a slight improvement in mode errors.
>
> compiler/hlds_out_goal.m:
> Don't use the result of cast_type_to_string when when writing out
> coerce casts.
>
> tests/hard_coded/Mercury.options:
> tests/hard_coded/Mmakefile:
> tests/hard_coded/coerce_opt.exp:
> tests/hard_coded/coerce_opt.m:
> tests/hard_coded/coerce_opt_2.m:
> Add test case.
Sorry, I forgot to add "for review" to the subject.
Peter
More information about the reviews
mailing list