Files
mercury/tests/invalid
Zoltan Somogyi 23768fc571 Improve diagnostics for type ambiguities.
compiler/typecheck_error_overload.m:
    When reporting type a type ambiguity that is itself an error
    (as opposed to being problematic *only* because it increases
    the number of type assigns needed), do NOT use terminology
    that implies that the problem is the sheer number of ambiguities.
    Indeed, the main test case of this code, bad_ambiguity_msg,
    involves just one predicate name that has two matches,
    which is the lowest possible level of ambiguity that
    deserves an error message.

    The old code used this bad terminology becaused it reused
    the code of the function that reported exceededing the
    ambiguity warning limit. Another effect of this bad reuse,
    apart from the bad wording of the always-printed message,
    was the addition of a verbose-only hint about the way to fix
    the excessive ambiguity, which is totally misleading in this
    situation.

    In the absence of this reuse, we can now simplify the operation
    of the code that generates warnings and errors about too much
    overloading.

    In some cases, eliminate some repetition in the diagnostic text.

tests/invalid/Mercury.options:
    Specify the printing of verbose-only parts of diagnostics.
    With this enabled, the inappropriateness of the reuse
    would have been immediately apparent.

tests/invalid/bad_ambiguity_msg.err_exp:
    Expect the updated wording. Do not expect a reminder about
    any verbose-only part, since now there is none.

tests/invalid/coerce_ambig.{m,err_exp}:
    Test for reporting not just one variable being ambiguous,
    but also for two variables being ambiguous. (Together,
    these exercise both paths through the relevant code.)
2025-10-17 15:05:16 +11:00
..
2024-05-10 06:41:54 +10:00
2023-10-24 16:27:11 +11:00
2024-05-07 10:11:11 +10:00
2025-05-03 17:46:33 +10:00
2024-05-07 10:11:11 +10:00
2023-12-08 05:04:48 +11:00
2021-07-27 13:29:46 +10:00
2021-07-27 13:29:46 +10:00
2024-05-07 10:11:11 +10:00
2025-05-19 16:33:05 +10:00
2025-05-03 17:46:33 +10:00
2024-05-07 10:11:11 +10:00
2024-06-24 21:45:45 +10:00
2024-05-23 23:54:56 +10:00
2024-05-11 12:23:31 +10:00
2024-05-11 12:23:31 +10:00
2024-06-02 03:22:21 +10:00
2024-06-02 03:22:21 +10:00
2024-06-02 03:22:21 +10:00
2024-06-02 03:22:21 +10:00
2024-05-11 12:23:31 +10:00