This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: define-constant: incorrect compilation


Hm.  Looks like a bug from 2000 ...
I checked in the attached patch.

(I will try to look at your otherbug reports and patches soon, but
I'll be off-line at least until Monday.)
--
	--Per Bothner
per at bothner dot com   http://per.bothner.com/

Index: BindingInitializer.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/BindingInitializer.java,v
retrieving revision 1.7
diff -u -r1.7 BindingInitializer.java
--- BindingInitializer.java	28 Oct 2002 21:47:52 -0000	1.7
+++ BindingInitializer.java	29 Mar 2003 21:21:22 -0000
@@ -25,11 +25,12 @@
     if (value instanceof QuoteExp)
       {
 	Object val = ((QuoteExp) value).getValue();
-	if (val == null || val instanceof String)
-	  return;
-	Literal lit = comp.litTable.findLiteral(val);
-	if (lit.field == this.field)
-	  return;
+	if (val != null && ! (val instanceof String))
+	  {
+	    Literal lit = comp.litTable.findLiteral(val);
+	    if (lit.field == this.field)
+	      return;
+	  }
       }
 
     if (! field.getStaticFlag())

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]