This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17225 - [QT3TS] CastAs-UnionType-9
Summary: [QT3TS] CastAs-UnionType-9
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-28 15:52 UTC by Tim Mills
Modified: 2012-05-28 16:11 UTC (History)
1 user (show)

See Also:


Attachments

Description Tim Mills 2012-05-28 15:52:59 UTC
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)
Comment 1 Michael Kay 2012-05-28 16:03:10 UTC
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.
Comment 2 Tim Mills 2012-05-28 16:11:41 UTC
How embarrassing.  Don't ask...