[m-rev.] For review: Bug fix for import statements in grade Java.

James Goddard goddardjames at yahoo.com
Mon Feb 16 14:38:16 AEDT 2004


Estimated hours taken: 0.1
Branches: main

Bug fix for importing modules in the Java grade.

compiler/mlds_to_java.m:
	Output all import statements as comments.  This is necessary because
	they are currently being used incorrectly (eg to import classes in a
	flat file structure) and safe because we always use fully qualified
	names anyway.


Index: mlds_to_java.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_java.m,v
retrieving revision 1.51
diff -u -d -r1.51 mlds_to_java.m
--- mlds_to_java.m	3 Feb 2004 05:40:00 -0000	1.51
+++ mlds_to_java.m	16 Feb 2004 03:31:15 -0000
@@ -373,7 +373,11 @@
 	% XXX Name mangling code should be put here when we start enforcing
 	%     Java's naming conventions.
 	{ ClassFile = File },
-	io__write_strings(["import ", ClassFile, ";\n"]).
+	% There are issues related to using import statements and Java's
+	% naming conventions.  To avoid these problems, we output
+	% dependencies as comments only.  This is ok, since we always use
+	% fully qualified names anyway.
+	io__write_strings(["// import ", ClassFile, ";\n"]).
 
 %--------------------------------------------------------------------
 %
--------------------------------------------------------------------------
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