mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +00:00
compiler/mode_errors.m:
When some branches of a disjunction, switch or if-then-else ground
a variable but other branches don't, print just this fact about each
branch. We used to print the insts themselves, but this is just clutter
that does not help programmers locate the source of the error.
Be consistent about the use of indentation in error messages.
Use bespoke types instead of booleans in the code affected by this change.
tests/invalid/default_ho_inst_2.err_exp:
tests/invalid/merge_inst_error.err_exp:
tests/invalid/multimode_dcg.err_exp:
Expect the updated error messages.
15 lines
692 B
Plaintext
15 lines
692 B
Plaintext
default_ho_inst_2.m:033: In clause for `main(di, uo)':
|
|
default_ho_inst_2.m:033: mode mismatch in disjunction.
|
|
default_ho_inst_2.m:033: The variable `F' has the following instantiation
|
|
default_ho_inst_2.m:033: states.
|
|
default_ho_inst_2.m:031: In this branch, `F' has instantiatedness
|
|
default_ho_inst_2.m:031: unique(
|
|
default_ho_inst_2.m:031: foo(
|
|
default_ho_inst_2.m:031: /* unique */ (func(
|
|
default_ho_inst_2.m:031: in
|
|
default_ho_inst_2.m:031: ) = out is semidet)
|
|
default_ho_inst_2.m:031: )
|
|
default_ho_inst_2.m:031: ).
|
|
default_ho_inst_2.m:033: In this branch, `F' is ground.
|
|
For more information, recompile with `-E'.
|