mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-15 13:55:07 +00:00
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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user