[m-rev.] diff: small fix to mlds_to_csharp.m

Tyson Dowd trd at cs.mu.OZ.AU
Wed Jul 18 22:02:37 AEST 2001


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


Estimated hours taken: 0.5
Branches: main

compiler/mlds_to_csharp.m:
	Ouput arrays in C# -- the code generator now passes types
	such as Object[] to this module.


Index: mlds_to_csharp.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_csharp.m,v
retrieving revision 1.11
diff -u -r1.11 mlds_to_csharp.m
--- mlds_to_csharp.m	2001/07/18 10:20:55	1.11
+++ mlds_to_csharp.m	2001/07/18 11:57:53
@@ -473,8 +475,14 @@
 	{ sorry(this_file, "value classes") }.
 write_il_simple_type_as_csharp_type(interface(_ClassName)) --> 
 	{ sorry(this_file, "interfaces") }.
-write_il_simple_type_as_csharp_type('[]'(_Type, _Bounds)) --> 
-	{ sorry(this_file, "arrays") }.
+write_il_simple_type_as_csharp_type('[]'(Type, Bounds)) --> 
+	write_il_type_as_csharp_type(Type),
+	io__write_string("[]"),
+	( { Bounds = [] } ->
+		[]
+	;
+		{ sorry(this_file, "arrays with bounds") }
+	).
 write_il_simple_type_as_csharp_type('&'(Type)) --> 
 		% XXX is this always right?
 	io__write_string("ref "),


-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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