[Bug 20314] New: [QT3TS] cbcl-promotion-003, -004

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20314

            Bug ID: 20314
           Summary: [QT3TS] cbcl-promotion-003, -004
    Classification: Unclassified
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Sunday, 9 December 2012 19:59:09 UTC