Fix a bug where the stub code generated with `--allow-stubs'

Estimated hours taken: 0.5
Branches: main

Fix a bug where the stub code generated with `--allow-stubs'
was violating an invariant that polymorphism pass was relying on.

compiler/polymorphism.m:
	Allow unifications whose kind (construction, deconstruction,
	simple_test, etc.) has already been determined.
This commit is contained in:
Fergus Henderson
2003-02-22 08:15:55 +00:00
parent f2b8ce92b4
commit 4ac56ddf67

View File

@@ -1300,7 +1300,11 @@ polymorphism__add_unification_typeinfos(TypeInfoLocns,
( Unification0 = complicated_unify(Modes, CanFail, _) ->
Unification = complicated_unify(Modes, CanFail, TypeInfoVars)
;
error("polymorphism__unification_typeinfos")
% This can happen if an earlier stage of compilation
% has already determined that this unification is particular
% kind of unification. In that case, the type_info vars
% won't be needed.
Unification = Unification0
).
:- pred polymorphism__process_unify_functor(prog_var, cons_id, list(prog_var),