diff: polymorphism.m bug fix

Fergus Henderson fjh at hydra.cs.mu.oz.au
Mon Jun 2 16:37:28 AEST 1997


compiler/polymorphism.m:
	Fix a bug in polymorphism__fixup_preds: in the case of a predicate
	with no modes, it wasn't doing the recursive call to fix up
	the remaining predicates.

Index: polymorphism.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/polymorphism.m,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- polymorphism.m	1997/05/20 01:52:01	1.105
+++ polymorphism.m	1997/06/02 06:36:09	1.106
@@ -267,11 +267,11 @@
 		pred_info_set_arg_types(PredInfo0, TypeVarSet, ArgTypes,
 			PredInfo),
 		map__det_update(PredTable0, PredId, PredInfo, PredTable),
-		module_info_set_preds(ModuleInfo0, PredTable, ModuleInfo1),
-		polymorphism__fixup_preds(PredIds, ModuleInfo1, ModuleInfo)
+		module_info_set_preds(ModuleInfo0, PredTable, ModuleInfo1)
 	;
-		ModuleInfo = ModuleInfo0
-	).
+		ModuleInfo1 = ModuleInfo0
+	),
+	polymorphism__fixup_preds(PredIds, ModuleInfo1, ModuleInfo).
 
 %---------------------------------------------------------------------------%
 

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list