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

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

--- Comment #6 from John Snelson <john.snelson@marklogic.com> ---
(In reply to Tim Mills from comment #3)
> This appears to prevent a processor from using static type analysis to avoid
> unnecessary function coercion.  For example, I think this requires that
> 
> function() { 1 } instance of function() as xs:integer
> 
> returns false.

I agree that your expression above should return false. I think it would be
reasonable to allow an implementation to determine a stricter return type for
the inline function using static typing if it can.

Of course, your own static typing implementation could easily carry two types
for the inline function expression - the "official" static type, and a static
type for the way it behaves in practice. That would allow you to avoid the
function coercion you were worried about.

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

Received on Tuesday, 3 May 2016 09:54:44 UTC