Bug#28367 and bug#28366, fixed invalid sequence type and expected error for higher-order-functions-070
authorabraaksm
Sun, 29 Mar 2015 19:21:40 +0200
changeset 885 2d5bf1f47cc6
parent 884 6cb8bf64b3f9
child 886 9d7479739035
Bug#28367 and bug#28366, fixed invalid sequence type and expected error for higher-order-functions-070
tests/expr/higher-order-functions/_higher-order-functions-test-set.xml
tests/expr/higher-order-functions/higher-order-functions-070.xsl
--- a/tests/expr/higher-order-functions/_higher-order-functions-test-set.xml	Sun Mar 29 18:22:29 2015 +0200
+++ b/tests/expr/higher-order-functions/_higher-order-functions-test-set.xml	Sun Mar 29 19:21:40 2015 +0200
@@ -962,15 +962,17 @@
    <test-case name="higher-order-functions-070">
       <description>
          Global variable cannot refer to itself, even if it makes sense.
+         Should raise circularity error XTDE0640.
       </description>
       <created by="Michael Kay" on="2013-02-07"/>
+      <modified by="Abel Braaksma" on="2015-03-29" change="Bug 28367 and 28366 (fixed invalid sequence type and expected error code)"/>
       <environment ref="hof-300"/>
       <dependencies/>
       <test>
          <stylesheet file="higher-order-functions-070.xsl"/>
       </test>
       <result>
-         <error code="XPST0008"/>
+         <error code="XTDE0640"/>
       </result>
    </test-case>
 </test-set>
--- a/tests/expr/higher-order-functions/higher-order-functions-070.xsl	Sun Mar 29 18:22:29 2015 +0200
+++ b/tests/expr/higher-order-functions/higher-order-functions-070.xsl	Sun Mar 29 19:21:40 2015 +0200
@@ -7,7 +7,7 @@
     
     <!-- global variable cannot refer to itself, even if it would make sense -->
     
-    <xsl:variable name="gcd" as="function()"
+    <xsl:variable name="gcd" as="function(*)"
      select="
      function($x as xs:integer, $y as xs:integer) {
        if ($y eq 0)
@@ -15,7 +15,7 @@
        else $gcd($y,$x mod $y)
      }"/>
      
-     <xsl:template name="main">
+     <xsl:template name="xsl:initial-template">
        <out><xsl:sequence select="$gcd(2,2)"/></out>
      </xsl:template>