[Bug 3830] Static typing of function declarations (K-Function-Prolog)

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

           Summary: Static typing of function declarations (K-Function-
                    Prolog)
           Product: XML Query Test Suite
           Version: 1.0.1
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XML Query Test Suite
        AssignedTo: andrew.eisenberg@us.ibm.com
        ReportedBy: nick@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


The following function declarations contain parameters without a declared type.
5.15 of the Formal Semantics states these are given the item()* sequence type.
But the functions expected them to be a different type. For example, in
function-declaration-006:

declare function local:mysum($i, $j)
{
   let $j := $i + $j
   return $j
};

This does not type check as $i + $j expectes anyAtomicType?


Could these functions be modified to define types for the parameters. Many of
them also currently test the results using the "eq" operator, so could they
have a return type to ensure this types checks, or have their results tested by
the test harness.


K-FunctionProlog-18
K-FunctionProlog-19
K-FunctionProlog-21
K-FunctionProlog-22
K-FunctionProlog-23
K-FunctionProlog-30
K-FunctionProlog-39
K-FunctionProlog-66
K2-FunctionProlog-1
K2-FunctionProlog-2
K2-FunctionProlog-3
K2-FunctionProlog-4

Received on Friday, 13 October 2006 14:48:53 UTC