Fix toRadixString on math.minInt (#1656)

Closes #1655
This commit is contained in:
Daniel Chao authored and GitHub committed 2026-06-05 18:27:03 +00:00
1 parent aa01241068
commit 41e012a0f0
3 files changed
+12 -7

No files matched your search

@@ -1,5 +1,5 @@
/*
* Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -190,7 +190,7 @@ public final class IntNodes {
@Specialization
@TruffleBoundary
protected String eval(long self, long radix) {
return (self < 0 ? "-" : "") + Long.toString(Math.abs(self), (int) radix);
return Long.toString(self, (int) radix);
}
}