This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The test "CastAs-UnionType-9" attempts to call a constructor function for the union of xs:date and xs:integer. Why does the xs:decimal argument not cause a FORG0001? xquery version "3.0"; import schema namespace s="http://www.w3.org/XQueryTest/unionListDefined"; let $f := s:myUnionType1(?) return $f(123.12)
xs:decimal can be cast to xs:integer, and the rules for casting to union say that if a cast to any of the member types succeeds, then the cast to the union type succeeds.
How embarrassing. Don't ask...