Open
Description
It looks like there are different interop problems when working with large integers (larger than long, so probably BigInteger
-related):
GraalVM MultiLanguage Shell 1.0.0-rc12
Copyright (c) 2013-2019, Oracle and/or its affiliates
JavaScript version 1.0
Python version 3.7.0
R version 3.5.1
Ruby version 2.4.4
js> python>
python> import polyglot
python> polyglot.eval(language="js", string="(x) => x * 2")(1234567890)
2469135780.0
python> polyglot.eval(language="js", string="(x) => x * 2")(12345678901234567890)
nan
python> polyglot.eval(language="ruby", string="lambda { | x | return x * 2 }")(1234567890)
2469135780
python> polyglot.eval(language="ruby", string="lambda { | x | return x * 2 }")(12345678901234567890)
Internal error occured: org.graalvm.polyglot.PolyglotException: org.truffleruby.language.control.RaiseException: AttributeError: 'int' object has no attribute '*' (PException)
Translated to internal error (RuntimeError)
Run with --verbose to see the full stack trace.
I don't know know yet whether this is only a GraalPython problem, or whether GraalJS or TruffleRuby also need to be fixed.