Skip to content

Commit 48beb74

Browse files
committed
Fix typo and return type of bigint negative exponent specialization.
(cherry picked from commit bc485a3)
1 parent 3389464 commit 48beb74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/nodes/binary/JSExponentiateNode.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -81,8 +81,8 @@ protected double doDouble(double a, double b) {
8181
}
8282

8383
@Specialization(guards = "isBigIntNegativeVal(b)")
84-
protected void doBigIntNegativeExponent(@SuppressWarnings("unused") BigInt a, @SuppressWarnings("unused") BigInt b) {
85-
throw Errors.createRangeError("Exponent must be positve");
84+
protected Object doBigIntNegativeExponent(@SuppressWarnings("unused") BigInt a, @SuppressWarnings("unused") BigInt b) {
85+
throw Errors.createRangeError("BigInt exponent must not be negative");
8686
}
8787

8888
@Specialization(guards = {"isBigIntZero(a)", "!isBigIntZero(b)", "!isBigIntNegativeVal(b)"})

0 commit comments

Comments
 (0)