W3C home > Mailing lists > Public > public-qt-comments@w3.org > January 2007

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

From: <bugzilla@wiggum.w3.org>
Date: Fri, 19 Jan 2007 13:49:31 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1H7u7X-0007Ed-VM@wiggum.w3.org>

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:32 UTC