Files
mercury/tests/invalid/merge_inst_error.err_exp
Zoltan Somogyi d1c08a30f1 Improve messages for merge mode errors.
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.
2020-07-01 17:08:31 +10:00

22 lines
1.2 KiB
Plaintext

merge_inst_error.m:060: In clause for `switch1(in, out)':
merge_inst_error.m:060: mode mismatch in disjunction.
merge_inst_error.m:060: The variable `S' is ground in 4 out of 6 branches.
merge_inst_error.m:060: It has non-ground instantiation states in the
merge_inst_error.m:060: following branches.
merge_inst_error.m:047: In this branch, `S' is free.
merge_inst_error.m:053: In this branch, `S' is free.
merge_inst_error.m:093: In clause for `switch2(in, out)':
merge_inst_error.m:093: mode mismatch in disjunction.
merge_inst_error.m:093: The variable `S' is ground in 5 out of 6 branches.
merge_inst_error.m:077: In this branch, `S' is free.
merge_inst_error.m:124: In clause for `switch3(in, out)':
merge_inst_error.m:124: mode mismatch in disjunction.
merge_inst_error.m:124: The variable `S' is ground in some branches but not
merge_inst_error.m:124: others.
merge_inst_error.m:111: In this branch, `S' is ground.
merge_inst_error.m:114: In this branch, `S' is ground.
merge_inst_error.m:118: In this branch, `S' is free.
merge_inst_error.m:121: In this branch, `S' is free.
merge_inst_error.m:124: In this branch, `S' is free.
For more information, recompile with `-E'.