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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29586

--- Comment #18 from Tim Mills <tim@cbcl.co.uk> ---
(In reply to John Snelson from comment #17)
> (In reply to Tim Mills from comment #16)
> > 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.
> 
> I think this text is unclear what to do in the case where no static typing
> information is available. We need that case to be the default, and for the
> text to allow a better type (a subtype of map(K,V)).

If the processor has sufficient information available (e.g. it knows that the
item matches type map(K, V), it can avoid coercion.  Otherwise (it only knows
that the item is map(*), it has to be pessimitic and introduce coercion. 
However, from the point of view of the user, there is no observable difference.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 26 May 2016 09:19:38 UTC