mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-24 05:43:53 +00:00
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.
9 lines
405 B
Plaintext
9 lines
405 B
Plaintext
coerce_void.m:010: In predicate `main'/2:
|
|
coerce_void.m:010: warning: unresolved polymorphism.
|
|
coerce_void.m:010: The variables with unbound types were:
|
|
coerce_void.m:010: List: list.list(T)
|
|
coerce_void.m:010: V_8: list.list(T)
|
|
coerce_void.m:010: The unbound type variables will be implicitly bound to the
|
|
coerce_void.m:010: builtin type `void'.
|
|
For more information, recompile with `-E'.
|