Skip to content

Commit

Permalink
Ensure LongWrapper is formatted as a Java long
Browse files Browse the repository at this point in the history
Fixes #4818
  • Loading branch information
niloc132 committed Nov 13, 2023
1 parent 89faae3 commit 951ca5a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public String format(NumberUnion number) {
} else if (number.isBigInteger()) {
return wrapped.format(number.asBigInteger().getWrapped());
} else if (number.isLongWrapper()) {
return wrapped.format(number.asLongWrapper().getWrapped());
return wrapped.format((Long) number.asLongWrapper().getWrapped());
}
throw new IllegalStateException("Can't format non-number object of type " + Js.typeof(number));
}
Expand Down

0 comments on commit 951ca5a

Please sign in to comment.