<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>29260</bug_id>
          
          <creation_ts>2015-11-03 19:41:37 +0000</creation_ts>
          <short_desc>Array Tests: function tests</short_desc>
          <delta_ts>2015-11-10 17:21:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>124069</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2015-11-03 19:41:37 +0000</bug_when>
    <thetext>This is inspired by the (closed) Bug 29220: In analogy with the map type rules, it could make sense to explain typing of arrays in more detail. The following paragraph or a similar one could be added to 2.5.5.9 of the XPath and XQuery 3.1 specs (...provided that it&apos;s correct):

&quot;The function signature of the array, treated as a function, is always function(xs:integer) as item()*, regardless of the actual member types in the array. This means that a function item type with a more specific return type, such as function(xs:integer) as xs:integer, does not match an array in the sense required to satisfy the instance of operator. However, the rules for function coercion mean that any array can be supplied as a value in a context where such a type is the required type, and a type error will only occur if an actual call on the array (treated as a function) returns a value that is not an instance of the required return type.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>124157</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-11-10 17:21:59 +0000</bug_when>
    <thetext>I&apos;ll do this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>