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 20314 - [QT3TS] cbcl-promotion-003, -004
Summary: [QT3TS] cbcl-promotion-003, -004
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Last Call drafts
Hardware: PC All
: 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: 2012-12-09 19:59 UTC by Michael Kay
Modified: 2013-01-02 16:43 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2012-12-09 19:59:06 UTC
I believe that these two tests (in prod-FunctionCall) can legitimately fail with a type error.

The first test contains the function:

declare function local:index-of($seq as xs:integer*, $item as xs:integer?) as xs:float* { 
        if (empty($item)) 
            then "item was empty" 
            else for $x at $p in $seq return if ($x eq $item) then $p else () 
        };

My interpretation of the rules for optimistic static type checking is that evaluation of the expression "item was empty" would necessarily raise a type error, and therefore the processor is allowed to raise the type error statically. (I concede that other readings of this rule are possible...)

Since the "then" branch is irrelevant to the purpose of the test, I suggest changing it to something like "then -1".

Similar reasoning applies to cbcl-promotion-004.
Comment 1 O'Neil Delpratt 2013-01-02 16:43:25 UTC
I agree. Tests have been fixed and committed to CVS.