http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2699

*** shadow/2699 Thu Jul 19 16:24:50 2001
--- shadow/2699.tmp.13240       Thu Jul 19 16:24:50 2001
***************
*** 0 ****
--- 1,57 ----
+ +============================================================================+
+ | Register type-error has variable-declaration location dependency           |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2699                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: CurrentCVS              |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Major                    OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: org.apache.xalan.xsltc  |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                         |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ When the enclosed xsl is compiled and run, the VM crashes with the error:
+ 
+ Exception in thread "main" java.lang.VerifyError: (class: Register_Error, method
+ : Func signature: (Lorg/apache/xalan/xsltc/dom/DOMAdapter;Lorg/apache/xalan/xslt
+ c/NodeIterator;Lorg/apache/xalan/xsltc/TransletOutputHandler;I)V) Register 5 con
+ tains wrong type
+         at java.lang.Class.forName0(Native Method)
+         at java.lang.Class.forName(Class.java:124)
+         at org.apache.xalan.xsltc.runtime.DefaultRun.doTransform(DefaultRun.java
+ , Compiled Code)
+         at org.apache.xalan.xsltc.runtime.DefaultRun.main(DefaultRun.java, Compi
+ led Code)
+ 
+ XSL
+ ---
+ 
+ <?xml version='1.0' encoding='utf-8' ?>
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+       <xsl:output method="text" indent="no"/>
+       <xsl:template match="/">
+               <xsl:call-template name="Func">
+                       <xsl:with-param name="Node" select="."/>
+                       <xsl:with-param name="Set" select="/"/>
+               </xsl:call-template>
+       </xsl:template>
+ 
+       <xsl:template name="Func">
+               <xsl:param name="Node"/>
+               <xsl:param name="Set"/>
+               <xsl:for-each select="$Set">
+ <!--          <xsl:variable name="b" select="1"/> --> <!-- declaring b here 
+ causes no problems -->
+                       <xsl:if test=". = $Node">
+                               <xsl:variable name="b" select="1"/> <!-- 
+ declaring b here causes crash -->
+                               <xsl:if test="$b = $b">
+                               </xsl:if>
+                       </xsl:if>
+               </xsl:for-each>
+       </xsl:template>
+ </xsl:stylesheet>

Reply via email to