[m-rev.] diff: java definition of dummy_var

Peter Wang novalazy at gmail.com
Thu Apr 23 12:56:52 AEST 2009

Branches: main

        Change Java definition of `dummy_var' to be of type Object, so anything
        can be assigned to it, as expected by the code being generated.

diff --git a/library/private_builtin.m b/library/private_builtin.m
index 312ceb4..8894046 100644
--- a/library/private_builtin.m
+++ b/library/private_builtin.m
@@ -1662,10 +1662,7 @@ no_clauses(PredName) :-
     // parameters that are not really passed around.  Occasionally a dummy
     // variable will be used by the code generator as an lval, so we use
     // private_builtin:dummy_var as that lval.
-    public static class Dummy {
-        public java.lang.Object F1;
-    };
-    public static Dummy dummy_var = new Dummy();
+    public static java.lang.Object dummy_var;

 :- pragma foreign_code("Java", "
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au

More information about the reviews mailing list