Currently LongIntElementImpl does not implement AnyElement.bigIntegerValue. Because of this, calling bigIntegerValue will rely on the default implementation, which throws an error.
Sample replication case:
val foo : AnyElement = loadSingleElement("${Long.MAX_VALUE}")
val bigIntValue = foo.bigIntegerValue
This results in the following error:
<unknown location>: Expected an element of type INT but found an element of type INT
com.amazon.ionelement.api.IonElementConstraintException: <unknown location>: Expected an element of type INT but found an element of type INT
at com.amazon.ionelement.api.IonUtils.constraintError(IonUtils.kt:49)
at com.amazon.ionelement.impl.AnyElementBase.errIfNotTyped(AnyElementBase.kt:105)
at com.amazon.ionelement.impl.AnyElementBase.getBigIntegerValue(AnyElementBase.kt:199)
Currently
LongIntElementImpl
does not implementAnyElement.bigIntegerValue
. Because of this, callingbigIntegerValue
will rely on the default implementation, which throws an error.Sample replication case:
This results in the following error:
A workaround until this is fixed could be:
Possible other TODO: