Only scala.math.BigDecimal is a valid match case. The problem probably arises for java.math.BigInteger as well.