[Bug 4268] Static typing of K2-FunctionProlog-22

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4268

           Summary: Static typing of K2-FunctionProlog-22
           Product: XML Query Test Suite
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: nick@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


I don't think the following static type checks without a static typing
extension:

declare function local:func() as xs:integer
{
text {"1"}
};

text {"1"} uses the following function

fs:item-sequence-to-untypedAtomic-text($items as item()*) as xs:untypedAtomic?

with the static typing rules for state:

"There are no special static typing rules for this function. Static type
analysis for this function should be performed as for a built-in function
declared with the given signature."

so when the body is type checked it gets an optional quantifier.

Changing the return type to "as xs:integer?" should fix this.

Received on Monday, 22 January 2007 13:39:40 UTC