mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 05:43:53 +00:00
compiler/add_mutable_aux_preds.m:
If a mutable has the same name as another mutable defined earlier,
report this fact, and don't try to implement the mutable. If we did
try to implement it, we would get a whole slew of errors about
multiple definitions of all the other kinds of items that we turn
a mutable definition into.
tests/invalid/duplicate_mutable.{m,err_exp}:
Add this test case for the diagnostics we generate for this issue.
tests/invalid/Mmakefile:
Enable the new test case.
4 lines
207 B
Plaintext
4 lines
207 B
Plaintext
duplicate_mutable.m:017: Error: this definition of the mutable [38;5;87mglobal[39;49m is a
|
||
duplicate_mutable.m:017: [38;5;203mduplicate.[39;49m
|
||
duplicate_mutable.m:015: The first definition is here.
|