mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +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
564 B
Plaintext
10 lines
564 B
Plaintext
uniq_modes.m:015: In clause for `main(di, uo)':
|
|
uniq_modes.m:015: in argument 2 of call to predicate `io.write'/3:
|
|
uniq_modes.m:015: mode error: variable `In' has instantiatedness
|
|
uniq_modes.m:015: `mostly_unique',
|
|
uniq_modes.m:015: expected instantiatedness was `unique'.
|
|
uniq_modes.m:015: This kind of uniqueness mismatch is usually caused by doing
|
|
uniq_modes.m:015: input/output or some other kind of destructive update in a
|
|
uniq_modes.m:015: context where it can be backtracked over, such as the
|
|
uniq_modes.m:015: condition of an if-then-else.
|