This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29597 - [QT3] modules-pub-priv-24
Summary: [QT3] modules-pub-priv-24
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-26 22:00 UTC by Benito van der Zander
Modified: 2016-07-19 16:23 UTC (History)
1 user (show)

See Also:


Attachments

Description Benito van der Zander 2016-04-26 22:00:15 UTC
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 <a>{local:test()}</a>, but there is no local:test() function. 
So it could throw XPST0017 instead the expected error
Comment 1 Benito van der Zander 2016-04-27 16:08:22 UTC
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
Comment 2 Abel Braaksma 2016-05-10 14:09:15 UTC
(In reply to Benito van der Zander from comment #1)
> but the variable is never used, is it still an
> error of the entire query? It might get evaluated lazily
Section "2.3.4 Errors and Optimization" 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).
Comment 3 Abel Braaksma 2016-06-21 16:08:01 UTC
> It might get evaluated lazily
Note that my comment #2 applies to *dynamic errors*, static errors must always be reported.
Comment 4 Michael Kay 2016-06-21 16:08:52 UTC
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.
Comment 5 O'Neil Delpratt 2016-07-19 16:23:18 UTC
Closing this bug as the fix has been applied in the test case.