W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2016

[Bug 29586] [XP31] 2.5.6.2 The judgement subtype-itemtype(Ai, Bi)

From: <bugzilla@jessica.w3.org>
Date: Thu, 26 May 2016 08:42:01 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29586-523-T1kew4mP87@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29586

--- Comment #16 from Tim Mills <tim@cbcl.co.uk> ---
In "2.5.5.8 Map Test", replace the text

"The function signature of the map, ... the required return type."

with

"The function signature of a map matching type map(K, V), treated as a
function, is function(xs:anyAtomicType) as V?.  It is thus always a subtype of
function(xs:anyAtomicType) as item()* regardless of the actual types of the
keys and values in the map.  The rules for function coercion mean that any map
can be supplied as a value in a context where the required type has a more
specific return type, such as function(xs:anyAtomicType) as xs:integer, even
when the map does not match in the sense required to satisfy the instance of
operator. In such cases, a type error will only occur if an actual call on the
map (treated as a function) returns a value that is not an instance of the
required return type."

Similarly, in "2.5.5.9 Array Test", replace the text

"The function signature of the array, ... the required return type."

with

"The function signature of an array matching array(X), treated as a function,
is function(xs:integer) as X.  It is thus always a subtype of
function(xs:integer) as item()* regardless of the actual member types in the
array.  The rules for function coercion mean that any array can be supplied as
a value in a context where the required type has a more specific return type,
such as function(xs:integer) as xs:integer, evnm when the array does not match
in the sense required to satisfy the instance of operator. In such cases, 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."

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 26 May 2016 08:42:07 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 26 May 2016 08:42:08 UTC