Files
mercury/tests/invalid/bug257.err_exp
Zoltan Somogyi 16b964be81 Improve warnings about unbound type variables.
compiler/post_typecheck.m:
    Do not generate warnings abouts unbound type variables in code
    that is not in the current module.

    If all the variables we are generating a report for have types
    that are *just* type variables, then report just the names
    of the variables; the names of the associated type variables
    are just clutter in that case (especially when those type variables
    are compiler-generated).

    If some of the variables we are generating a report for have types
    that are not just type variables (which can happen when the type is
    e.g. list(T)), then report the type of each variable as before,
    but try to line things up so that all the types start in the same column.
    This should make the message easier to read.

    In both cases, sort the list of variables on their names.

    Update the wording of the warning to accommodate the changes above,
    and to expand contractions.

tests/invalid/bad_sv_unify_msg.err_exp:
tests/invalid/bug257.err_exp:
tests/invalid/coerce_void.err_exp:
tests/invalid/freefree.err_exp:
tests/invalid/typeclass_test_8.err_exp:
tests/invalid/unsatisfiable_constraint.err_exp:
tests/warnings/singleton_test.exp:
tests/warnings/singleton_test.exp2:
tests/warnings/singleton_test.exp3:
    Expect the updated warning text.
2023-06-08 18:58:06 +02:00

9 lines
402 B
Plaintext

bug257.m:017: In predicate `oops'/2:
bug257.m:017: warning: unresolved polymorphism.
bug257.m:017: The variable with an unbound type was:
bug257.m:017: Gee
bug257.m:017: Its type will be implicitly set to the builtin type `void'.
bug257.m:022: Error: the goal inside the require_complete_switch [Gee] scope is
bug257.m:022: not a switch on `Gee'.
For more information, recompile with `-E'.