[Bug 4265] Static typing of K2-FunctionProlog-9

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

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


The multiplication operator here fails to typecheck becuase
local:multiplySequence is typed as item()*.

(:*******************************************************:)
(: Test: K2-FunctionProlog-9                             :)
(: Written by: Frans Englich                             :)
(: Date: 2007-01-15T15:15:45+01:00                       :)
(: Purpose: A recursive function multiplying a sequence. :)
(:*******************************************************:)
declare function local:multiplySequence($input)
{
    if      (empty($input))
    then    1
    else    $input[1] * local:multiplySequence($input[position() != 1])
};
local:multiplySequence((1, 2, 3, 4, 5))

Received on Friday, 19 January 2007 13:49:38 UTC