diff options
Diffstat (limited to 'src/library/scala/math/BigInt.scala')
-rw-r--r-- | src/library/scala/math/BigInt.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/math/BigInt.scala b/src/library/scala/math/BigInt.scala index 4673aa5d48..afc4d5c535 100644 --- a/src/library/scala/math/BigInt.scala +++ b/src/library/scala/math/BigInt.scala @@ -34,9 +34,9 @@ object BigInt { if (minCached <= i && i <= maxCached) { val offset = i - minCached var n = cache(offset) - if (n eq null) { n = new BigInt(BigInteger.valueOf(i)); cache(offset) = n } + if (n eq null) { n = new BigInt(BigInteger.valueOf(i.toLong)); cache(offset) = n } n - } else new BigInt(BigInteger.valueOf(i)) + } else new BigInt(BigInteger.valueOf(i.toLong)) /** Constructs a `BigInt` whose value is equal to that of the * specified long value. |