Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

5 (int div int) gives ClassCastException - ID: 788748
Last Update: Settings changed ( mhkay )

The static type of ($x div 2) where $x is an integer,
is being wrongly inferred as xs:integer rather than
xs:decimal. This can lead to a ClassCastException if
the result is used in a context where an integer is
expected, for example

1 to xs:integer($x div 2)

Occurs in 7.6.5 and possibly earlier releases.

Source code fixed (extra logic added to getItemType()
in ArithmeticExpression.

Test case added: bug97


Michael Kay ( mhkay ) - 2003-08-14 15:01

5

Closed

Fixed

Michael Kay

XPath conformance

v7.6.5

Public


Comments

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2003-10-06 16:08 mhkay
resolution_id None 2003-10-06 16:08 mhkay
close_date - 2003-10-06 16:08 mhkay