Description
I have a schema with an expression. The expression uses the value of an element of type unsignedInt, and some variables also all of type unsignedInt. The rest of the expression is just add and multiply and subtract.
I get this exception:
org.apache.daffodil.exceptions.Abort: Invariant broken. Runtime.scala - Leaked exception: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long at org.apache.daffodil.infoset.DataValue$.getLong$extension(DataValue.scala:88) at org.apache.daffodil.dpath.UnsignedIntToLong$.computeValue(ConverterOps3.scala:91) at org.apache.daffodil.dpath.UnsignedIntToLong$.computeValue(ConverterOps3.scala:89) at org.apache.daffodil.dpath.Converter.run(DPathRuntime.scala:293) at org.apache.daffodil.dpath.CompiledDPath.run(DPathRuntime.scala:139) at org.apache.daffodil.dpath.NumericOperator.run(DPathRuntime.scala:262)
There is a conversion UnsignedIntToLong being invoked. This just calls a getLong which just calls a v.asInstanceOf[JLong] cast, which fails because v is a java BigInteger.