<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29597</bug_id>
          
          <creation_ts>2016-04-26 22:00:15 +0000</creation_ts>
          <short_desc>[QT3] modules-pub-priv-24</short_desc>
          <delta_ts>2016-07-19 16:23:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benito van der Zander">benito</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>abel.braaksma</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>126175</commentid>
    <comment_count>0</comment_count>
    <who name="Benito van der Zander">benito</who>
    <bug_when>2016-04-26 22:00:15 +0000</bug_when>
    <thetext>In #29589 I  wrote local:test in modules-collide-var-001 could raise XPST0017, which is ofc nonsense.
It was supposed to read:

modules-pub-priv-24 (!) has &lt;a&gt;{local:test()}&lt;/a&gt;, but there is no local:test() function. 
So it could throw XPST0017 instead the expected error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126200</commentid>
    <comment_count>1</comment_count>
    <who name="Benito van der Zander">benito</who>
    <bug_when>2016-04-27 16:08:22 +0000</bug_when>
    <thetext>Now I am starting to wonder: When an variable initialization expression has an (static or dynamic) error, but the variable is never used, is it still an error of the entire query? It might get evaluated lazily</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126400</commentid>
    <comment_count>2</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-05-10 14:09:15 +0000</bug_when>
    <thetext>(In reply to Benito van der Zander from comment #1)
&gt; but the variable is never used, is it still an
&gt; error of the entire query? It might get evaluated lazily
Section &quot;2.3.4 Errors and Optimization&quot; of XP31 explains this. If the variable is never called, it need not be evaluated. In such cases it is implementation dependent whether the dynamic error is raised (i.e., with eager variable evaluation, the error may always be raised, with lazy evaluation only when actually evaluated).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126814</commentid>
    <comment_count>3</comment_count>
    <who name="Abel Braaksma">abel.braaksma</who>
    <bug_when>2016-06-21 16:08:01 +0000</bug_when>
    <thetext>&gt; It might get evaluated lazily
Note that my comment #2 applies to *dynamic errors*, static errors must always be reported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126815</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-06-21 16:08:52 +0000</bug_when>
    <thetext>Decision after WG discussion:

(a) there are two static errors in the test, we should eliminate the call on local:test() so there is only one error.

(b) it then becomes mandatory to report the error. Static errors must be reported whether or not the code is evaluated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126986</commentid>
    <comment_count>5</comment_count>
    <who name="O&apos;Neil Delpratt">oneil</who>
    <bug_when>2016-07-19 16:23:18 +0000</bug_when>
    <thetext>Closing this bug as the fix has been applied in the test case.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>