You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by tm...@apache.org on 2001/08/23 16:30:10 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/compiler RelationalExpr.java
tmiller 01/08/23 07:30:10
Modified: java/src/org/apache/xalan/xsltc/compiler RelationalExpr.java
Log:
bug fix 2838, cast to type real if both operands are
ResultTreeType
Revision Changes Path
1.6 +7 -2 xml-xalan/java/src/org/apache/xalan/xsltc/compiler/RelationalExpr.java
Index: RelationalExpr.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/RelationalExpr.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RelationalExpr.java 2001/06/17 12:23:31 1.5
+++ RelationalExpr.java 2001/08/23 14:30:10 1.6
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: RelationalExpr.java,v 1.5 2001/06/17 12:23:31 curcuru Exp $
+ * @(#)$Id: RelationalExpr.java,v 1.6 2001/08/23 14:30:10 tmiller Exp $
*
* The Apache Software License, Version 1.1
*
@@ -101,10 +101,15 @@
}
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
-
Type tleft = _left.typeCheck(stable);
Type tright = _right.typeCheck(stable);
+ //bug fix # 2838, cast to reals if both are result tree fragments
+ if (tleft instanceof ResultTreeType &&
+ tright instanceof ResultTreeType ) {
+ _right = new CastExpr(_right, Type.Real);
+ _left = new CastExpr(_left, Type.Real);
+ }
// If one is of reference type, then convert the other too
if (hasReferenceArgs()) {
if (tleft instanceof ReferenceType) {
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org