This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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's correct): "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."
I'll do this.