[m-rev.] [dotnet-foreign] diff: type_ctor_info bug

Peter Ross peter.ross at miscrit.be
Tue May 15 00:44:05 AEST 2001


Hi,


===================================================================


Estimated hours taken: 1
Branches: dotnet-foreign

type_ctor_info.m:
    Fix a bug where we were not constructing a type_ctor_info for
    foreign_types.


Index: type_ctor_info.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/type_ctor_info.m,v
retrieving revision 1.13.4.2
diff -u -r1.13.4.2 type_ctor_info.m
--- type_ctor_info.m	2001/04/11 11:16:26	1.13.4.2
+++ type_ctor_info.m	2001/05/14 14:37:46
@@ -87,8 +87,6 @@
 			map__lookup(TypeTable, TypeId, TypeDefn),
 			hlds_data__get_type_defn_body(TypeDefn, TypeBody),
 			TypeBody \= abstract_type,
-				% XXXX
-			TypeBody \= foreign_type(_, _),
 			\+ type_id_has_hand_defined_rtti(TypeId)
 		->
 			type_ctor_info__gen_type_ctor_gen_info(TypeId,
@@ -116,11 +114,13 @@
 	module_info_get_special_pred_map(ModuleInfo, SpecMap),
 	globals__lookup_bool_option(Globals, special_preds, SpecialPreds),
 	(
+		hlds_data__get_type_defn_body(TypeDefn, Body),
 		(
-			SpecialPreds = yes
+			SpecialPreds = yes,
+				% XXXX
+			Body \= foreign_type(_, _)
 		;
 			SpecialPreds = no,
-			hlds_data__get_type_defn_body(TypeDefn, Body),
 			Body = du_type(_, _, _, yes(_UserDefinedEquality))
 		)
 	->

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list