Project

Profile

Help

Bug #4443

closed

Type check: xs:byte, unary expression

Added by Christian Grün over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2020-01-28
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9, trunk
Fix Committed on Branch:
9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

The following two expressions yield different results (just as they did in BaseX):

-xs:byte(-128) instance of xs:byte,

for $i in -128
return -xs:byte($i) instance of xs:byte

Observed with Saxon-EE 9.9.1.6J.

Actions #1

Updated by Michael Kay over 2 years ago

Thanks for reporting it.

The static type inference for a NegateExpression i.e. unary minus) is wrong; it assumes the result will be the same type as the operand, whereas it should be the primitive base type thereof.

Actions #2

Updated by Michael Kay over 2 years ago

  • Applies to branch trunk added
  • Fix Committed on Branch 9.9, trunk added
Actions #3

Updated by Michael Kay over 2 years ago

  • Category set to XPath conformance
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
Actions #4

Updated by O'Neil Delpratt about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.1.7 added

Patch applied in the 9.9.1.7 maintenance release.

Please register to edit this issue

Also available in: Atom PDF