mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +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.
61 lines
3.4 KiB
Plaintext
61 lines
3.4 KiB
Plaintext
multimode_dcg.m:031: In the head of a clause for
|
|
multimode_dcg.m:031: predicate `multimode_dcg.test1'/3:
|
|
multimode_dcg.m:031: syntax error: some but not all arguments have mode
|
|
multimode_dcg.m:031: annotations.
|
|
multimode_dcg.m:033: In clause for `test1(out, di, uo)':
|
|
multimode_dcg.m:033: mode mismatch in disjunction.
|
|
multimode_dcg.m:033: The variable `HeadVar__1' is ground in some branches but
|
|
multimode_dcg.m:033: not others.
|
|
multimode_dcg.m:031: In this branch, `HeadVar__1' is free.
|
|
multimode_dcg.m:033: In this branch, `HeadVar__1' is ground.
|
|
multimode_dcg.m:033: In the head of a clause for
|
|
multimode_dcg.m:033: predicate `multimode_dcg.test1'/3:
|
|
multimode_dcg.m:033: syntax error: some but not all arguments have mode
|
|
multimode_dcg.m:033: annotations.
|
|
multimode_dcg.m:041: In the head of a clause for
|
|
multimode_dcg.m:041: predicate `multimode_dcg.test2'/4:
|
|
multimode_dcg.m:041: syntax error: some but not all arguments have mode
|
|
multimode_dcg.m:041: annotations.
|
|
multimode_dcg.m:043: In the head of a clause for
|
|
multimode_dcg.m:043: predicate `multimode_dcg.test2'/4:
|
|
multimode_dcg.m:043: syntax error: some but not all arguments have mode
|
|
multimode_dcg.m:043: annotations.
|
|
multimode_dcg.m:045: In the head of a clause for
|
|
multimode_dcg.m:045: predicate `multimode_dcg.test2'/4:
|
|
multimode_dcg.m:045: syntax error: some but not all arguments have mode
|
|
multimode_dcg.m:045: annotations.
|
|
multimode_dcg.m:047: In clause for `test2(in, out, di, uo)':
|
|
multimode_dcg.m:047: mode mismatch in disjunction.
|
|
multimode_dcg.m:047: The variable `HeadVar__2' is ground in some branches but
|
|
multimode_dcg.m:047: not others.
|
|
multimode_dcg.m:041: In this branch, `HeadVar__2' is free.
|
|
multimode_dcg.m:043: In this branch, `HeadVar__2' is ground.
|
|
multimode_dcg.m:045: In this branch, `HeadVar__2' is free.
|
|
multimode_dcg.m:047: In this branch, `HeadVar__2' is ground.
|
|
multimode_dcg.m:047: In clause for `test2(out, in, di, uo)':
|
|
multimode_dcg.m:047: mode mismatch in disjunction.
|
|
multimode_dcg.m:047: The variable `HeadVar__1' is ground in some branches but
|
|
multimode_dcg.m:047: not others.
|
|
multimode_dcg.m:041: In this branch, `HeadVar__1' is free.
|
|
multimode_dcg.m:043: In this branch, `HeadVar__1' is free.
|
|
multimode_dcg.m:045: In this branch, `HeadVar__1' is ground.
|
|
multimode_dcg.m:047: In this branch, `HeadVar__1' is ground.
|
|
multimode_dcg.m:047: In clause for `test2(out, out, di, uo)':
|
|
multimode_dcg.m:047: mode mismatch in disjunction.
|
|
multimode_dcg.m:047: The variable `HeadVar__1' is ground in some branches but
|
|
multimode_dcg.m:047: not others.
|
|
multimode_dcg.m:041: In this branch, `HeadVar__1' is free.
|
|
multimode_dcg.m:043: In this branch, `HeadVar__1' is free.
|
|
multimode_dcg.m:045: In this branch, `HeadVar__1' is ground.
|
|
multimode_dcg.m:047: In this branch, `HeadVar__1' is ground.
|
|
multimode_dcg.m:047: The variable `HeadVar__2' is ground in some branches but
|
|
multimode_dcg.m:047: not others.
|
|
multimode_dcg.m:041: In this branch, `HeadVar__2' is free.
|
|
multimode_dcg.m:043: In this branch, `HeadVar__2' is ground.
|
|
multimode_dcg.m:045: In this branch, `HeadVar__2' is free.
|
|
multimode_dcg.m:047: In this branch, `HeadVar__2' is ground.
|
|
multimode_dcg.m:047: In the head of a clause for
|
|
multimode_dcg.m:047: predicate `multimode_dcg.test2'/4:
|
|
multimode_dcg.m:047: syntax error: some but not all arguments have mode
|
|
multimode_dcg.m:047: annotations.
|