From 7669bc789b3a4acca7eb63e8bdcdb4e7eb4cc75a Mon Sep 17 00:00:00 2001 From: Jamie Willis Date: Mon, 8 Apr 2024 17:28:37 +0100 Subject: [PATCH] backport fix for #230 --- .../src/main/scala/parsley/token/numeric/SignedInteger.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsley/shared/src/main/scala/parsley/token/numeric/SignedInteger.scala b/parsley/shared/src/main/scala/parsley/token/numeric/SignedInteger.scala index c8777caf2..9a2f30863 100644 --- a/parsley/shared/src/main/scala/parsley/token/numeric/SignedInteger.scala +++ b/parsley/shared/src/main/scala/parsley/token/numeric/SignedInteger.scala @@ -28,7 +28,7 @@ private [token] final class SignedInteger(desc: NumericDesc, unsigned: UnsignedI override def number: Parsley[BigInt] = err.labelIntegerSignedNumber.apply(_number) override protected [numeric] def bounded[T](number: Parsley[BigInt], bits: Bits, radix: Int, label: (ErrorConfig, Boolean) => LabelWithExplainConfig) - (implicit ev: CanHold[bits.self,T]): Parsley[T] = label(err, false) { + (implicit ev: CanHold[bits.self,T]): Parsley[T] = label(err, true) { err.filterIntegerOutOfBounds(bits.lowerSigned, bits.upperSigned, radix).collect(number) { case x if bits.lowerSigned <= x && x <= bits.upperSigned => ev.fromBigInt(x) }