[m-rev.] for review: do occurs checks on the parse tree
novalazy at gmail.com
Wed Apr 15 14:51:30 AEST 2020
On Wed, 15 Apr 2020 02:57:04 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> The attached diff implements this. For post commit review by anyone.
> diff --git a/tests/warnings/occurs.m b/tests/warnings/occurs.m
> index b98ee2475..80bb98794 100644
> --- a/tests/warnings/occurs.m
> +++ b/tests/warnings/occurs.m
> @@ -10,24 +10,64 @@
> ( if
> disable_warning [suspected_occurs_check_failure] (
> + % We should not get a warning for this occurs check
> + % violatiom because the warnings has been disabled.
> A = [_A2, _A3, _A4 | A]
> - Y = 1
> + Z = 1
> - Y = 2
> + Z = 2
> + ),
> + Program = program(0),
> + Interpretation = set.make_singleton_set("xyzzy"),
> + % We should not get a warning for this occurs check violatiom
> + % because the function symbol involved is not a *data* constructor.
> + ( if Interpretation = tp(Program, Interpretation) then
> + MaybeFixpoint = "have reached fixpoint"
> + else
> + MaybeFixpoint = "have not reached fixpoint"
I've fixed the couple of spelling mistakes in this file directly.
The rest looks fine.
More information about the reviews