mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 04:43:53 +00:00
Estimated hours taken: 2
compiler/polymorphism.m:
Abort if there is a polymorphic unification that is in
a partially instantiated mode. This error should be
caught earlier (probably during mode analysis), but it's
best to abort rather than just go ahead and generate
bad code.
tests/invalid/polymorphic_unification.m:
tests/invalid/polymorphic_unification.err_exp:
A test case for the above change.
tests/invalid/Mmakefile:
Turn this test case on.
21 lines
244 B
Mathematica
21 lines
244 B
Mathematica
:- module polymorphic_unification.
|
|
|
|
:- interface.
|
|
|
|
:- import_module io.
|
|
|
|
:- pred main(io__state::di, io__state::uo) is det.
|
|
|
|
:- implementation.
|
|
|
|
main -->
|
|
[].
|
|
|
|
:- import_module list.
|
|
|
|
:- pred p(T, T).
|
|
:- mode p(in, list_skel->dead).
|
|
|
|
p(X, X).
|
|
|