Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -416,7 +416,12 @@ private DynamicObject concatNumeric(DynamicObject string, int c) {
return string;
}

private DynamicObject charRangeException(Number value) {
private DynamicObject charRangeException(int value) {
return getContext().getCoreLibrary().rangeError(
String.format("%d out of char range", value), this);
}

private DynamicObject charRangeException(long value) {

This comment has been minimized.

Copy link
@eregon

eregon Dec 25, 2015

Member

The long one alone should be enough, right?

This comment has been minimized.

Copy link
@nirvdrum

nirvdrum Dec 27, 2015

Author Contributor

Good point. I was trying to avoid type promotion, but I recall the rules here being a bit counter-intuitive. It's slow path anyway, so I'll just do the long one.

return getContext().getCoreLibrary().rangeError(
String.format("%d out of char range", value), this);
}

0 comments on commit 3e6f8f1

Please sign in to comment.