BigInt cast problem: ava.lang.ClassCastException: java.lang.Integer cannot be cast to scala.math.Big

354 views
Skip to first unread message

david mlw

unread,
Aug 5, 2018, 11:39:45 PM8/5/18
to RISC-V HW Dev

case object Key Field[BigInt][0]
val value
:BigInt = p(Key) // this will generate "java.lang.ClassCastException: java.lang.Integer cannot be cast to scala.math.BigInt"



but this can work out:

case class Key (value :BigInt = 0)
case object Key Field[Key]
val value
:BigInt = p(Key).value


Reply all
Reply to author
Forward
0 new messages