mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 21:03:53 +00:00
compiler/mode_errors.m:
When a mode mismatch is between an expected unique inst and an
actual mostly_unique inst, mention the usual source of such mismatches.
tests/invalid/ho_unique_error.err_exp:
tests/invalid/io_in_ite_cond.err_exp:
tests/invalid/mostly_uniq1.err_exp:
tests/invalid/mostly_uniq2.err_exp:
tests/invalid/uniq_modes.err_exp:
tests/invalid/uniq_neg.err_exp:
Update these files to expect the extra text in the error message.
tests/invalid/io_in_ite_cond.m:
Improve programming style.
10 lines
590 B
Plaintext
10 lines
590 B
Plaintext
uniq_neg.m:031: In clause for `unify(in, in, in, in, di, uo)':
|
|
uniq_neg.m:031: in argument 3 of call to predicate `uniq_neg.occurs'/4:
|
|
uniq_neg.m:031: mode error: variable `STATE_VARIABLE_Store_0' has
|
|
uniq_neg.m:031: instantiatedness `mostly_unique',
|
|
uniq_neg.m:031: expected instantiatedness was `unique'.
|
|
uniq_neg.m:031: This kind of uniqueness mismatch is usually caused by doing
|
|
uniq_neg.m:031: input/output or some other kind of destructive update in a
|
|
uniq_neg.m:031: context where it can be backtracked over, such as the
|
|
uniq_neg.m:031: condition of an if-then-else.
|