Skip to content

Commit 87a2109

Browse files
committed
Fixed handling of non-integer types in math.factorial() as expected by test_math.py
1 parent f325987 commit 87a2109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/MathModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ public Object factorialPFL(PFloat value) {
488488
public Object factorialObject(VirtualFrame frame, Object value,
489489
@CachedLibrary("value") PythonObjectLibrary lib,
490490
@Cached("create()") FactorialNode recursiveNode) {
491-
return recursiveNode.execute(frame, lib.asPInt(value));
491+
return recursiveNode.execute(frame, lib.asIndex(value));
492492
}
493493

494494
protected boolean isInteger(double value) {

0 commit comments

Comments
 (0)