- From: <bugzilla@jessica.w3.org>
- Date: Wed, 27 Apr 2016 10:15:08 +0000
- To: public-qt-comments@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29586 --- Comment #3 from Tim Mills <tim@cbcl.co.uk> --- I'm unhappy that map(k, Vm) is not a subtype of function(xs:anyAtomicType) as Vf, where Vm is a subtype of Vf. and that array(Va) is not a subtype of function(xs:integer) as Vf, where Vm is a subtype of Vf. This stems from the text "The function signature of the map, treated as a function, is always function(xs:anyAtomicType) as item()*, regardless of the actual types of the keys and values in the map. This means that a function item type with a more specific return type, such as function(xs:anyAtomicType) as xs:integer, does not match a map in the sense required to satisfy the instance of operator. However, the rules for function coercion mean that any map 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 map (treated as a function) returns a value that is not an instance of the required return type." 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. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Wednesday, 27 April 2016 10:15:14 UTC