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 29572 - too specific type tests: failing when given xs:integer instead of xs:decimal
Summary: too specific type tests: failing when given xs:integer instead of xs:decimal
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Working drafts
Hardware: PC All
: 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: 2016-04-12 13:43 UTC by O'Neil Delpratt
Modified: 2016-04-26 20:18 UTC (History)
1 user (show)

See Also:


Attachments

Description O'Neil Delpratt 2016-04-12 13:43:40 UTC
The bug #23229 has been transferred to the QT3:

These tests

op-numeric-add-1
op-numeric-mod-1
op-numeric-multiply-1
op-numeric-subtract-1
op-numeric-unary-minus-1
op-numeric-unary-plus-1


all require the result of an operation on an integer value of type xs:decimal to have the type xs:decimal.

However (as just discussed on the xquery-talk mailing list) it is legal to cast any integer valued decimal to integer at any time, i.e.  `-xs:decimal(1) instance of xs:integer`  or `xs:decimal(1) instance of xs:integer` might both be true
Comment 1 Michael Kay 2016-04-26 19:38:09 UTC
See also bug #29401
Comment 2 Michael Kay 2016-04-26 20:18:40 UTC
I have fixed the tests by using "instance of" on each item in the result sequence to check the type.