Skip to content

Commit 2e083d5

Browse files
committed
Use array of bytes co construnct BigInt
1 parent 52a237d commit 2e083d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/scala/quoted/Liftable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ object Liftable {
241241

242242
given as Liftable[BigInt] = new Liftable[BigInt] {
243243
def toExpr(x: BigInt): given QuoteContext => Expr[BigInt] =
244-
'{ BigInt(${x.toString(Character.MAX_RADIX).toExpr}, ${Character.MAX_RADIX.toExpr}) }
244+
'{ BigInt(${x.toByteArray.toExpr}) }
245245
}
246246

247247
/** Lift a BigDecimal using the default MathContext */

0 commit comments

Comments
 (0)