Skip to content

Commit 9f5f697

Browse files
committed
[GR-11897] Unsupported specialization from CompileNode.
PullRequest: graalpython/205
2 parents 3f9c1b4 + ef98253 commit 9f5f697

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/test_builtin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ def test_bin(self):
2525
self.assertEqual(bin(MyIndexable(False)), '0b0')
2626
self.assertEqual(bin(MyIndexable(True)), '0b1')
2727
self.assertEqual(bin(MyIndexable(-(2**65))), '-0b1' + '0' * 65)
28+
29+
def test_GR11897(self):
30+
globs = {}
31+
code = 'a' + ' = ' + '8.01234567890123'
32+
exec(code, globs)
33+
self.assertEqual(globs['a'], 8.01234567890123)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,7 @@ private static Object evalNode(RootNode root, PythonObject globals, PythonObject
553553
// compile(source, filename, mode, flags=0, dont_inherit=False, optimize=-1)
554554
@Builtin(name = COMPILE, fixedNumOfPositionalArgs = 3, keywordArguments = {"flags", "dont_inherit", "optimize"})
555555
@GenerateNodeFactory
556+
@TypeSystemReference(PythonArithmeticTypes.class)
556557
public abstract static class CompileNode extends PythonBuiltinNode {
557558
@Specialization
558559
@TruffleBoundary

0 commit comments

Comments
 (0)