When a big integer value is cast to xs:long (using
either a cast expression or a constructor function),
the effect is a no-op: the supplied value is not
checked to be in range, and is returned with its
original type annotation.
Here "big integer" means any xs:integer value that is
internally represented as a BigIntegerValue. This may
be because it was supplied as an integer literal bigger
than a long, or because it was computed using an
arithmetic expression capable of returning a value
bigger than a long.
Source fix: in module
convertPrimitive, remove the case label "case
Type.LONG" from its current position, and insert it
into the group of case labels that includes "case