Files
mercury/tests/invalid/error_in_list.err_exp
Zoltan Somogyi 2e0f12ba39 Use the last context word in type diagnostics.
compiler/hlds_out_util.m:
    When returning the pieces to use to describe a unify context,
    return an indication of what we called the innermost part of the context.

compiler/typecheck_errors.m:
    Use this info to decide what to call the variable that has the
    incorrect type in a diagnostic, if the variable has no name of its own,
    and therefore *has* to be described by position.

compiler/det_analysis.m:
compiler/det_report.m:
compiler/mode_errors.m:
compiler/typecheck_error_util.m:
    Ignore the extra info now returned by the updated predicate
    in hlds_out_util.m.

tests/invalid/error_in_list.err_exp:
tests/invalid/getopt_old.err_exp:
    Expect updated diagnostics.
2024-05-24 10:08:11 +10:00

1014 B

error_in_list.m:015: In clause for function `f'/0:
error_in_list.m:015: in function result term of clause head:
error_in_list.m:015: in list element #5:
error_in_list.m:015: type error in unification of element
error_in_list.m:015: and constant `"five"'.
error_in_list.m:015: Element has type
error_in_list.m:015: int,
error_in_list.m:015: constant `"five"' has type
error_in_list.m:015: string.
error_in_list.m:015: In clause for function `f'/0:
error_in_list.m:015: in function result term of clause head:
error_in_list.m:015: in list element #7:
error_in_list.m:015: type error in unification of element
error_in_list.m:015: and constant `7.0'.
error_in_list.m:015: Element has type
error_in_list.m:015: int,
error_in_list.m:015: constant `7.0' has type
error_in_list.m:015: float.
For more information, recompile with `-E'.