mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 10:53:40 +00:00
compiler/det_report.m:
... when a "declared det, inferred multi" kind of determinism error
is caused by the (probably unexpected, possibly hard-to-see) presence
of a disjunction.
Change the wording to refer to "disjuncts" instead of "clauses";
while in Mercury, all clauses in multi-clause definitions are implicitly
also disjuncts, not all disjuncts are whole clauses.
tests/invalid/bug496.err_exp:
tests/invalid/det_errors.err_exp:
tests/invalid/not_a_switch.err_exp:
tests/invalid/require_scopes.err_exp:
tests/invalid/switch_arm_multi_not_det.err_exp:
Expect the updated form of the error message.
10 lines
585 B
Plaintext
10 lines
585 B
Plaintext
not_a_switch.m:014: In `not_a_switch'(in, out):
|
|
not_a_switch.m:014: error: determinism declaration not satisfied.
|
|
not_a_switch.m:014: Declared `det', inferred `nondet'.
|
|
not_a_switch.m:014: The reasons for the difference are the following.
|
|
not_a_switch.m:019: Disjunction has more than one disjunct with solutions.
|
|
not_a_switch.m:021: Unification of `A' and `maybe.yes(Int2)' can fail.
|
|
not_a_switch.m:022: In argument 1 of clause head:
|
|
not_a_switch.m:022: unification of `HeadVar__1' and `maybe.no' can fail.
|
|
not_a_switch.m:022: This later disjunct may have a solution.
|