-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quirks of methods with float parameters in interop #272
Comments
Hi @tporeba in general, we are very wary of (potential) lossy conversions. However, you uncover some cases where I need to take an additional look. You have to take care what the parser actually makes from your code. Even though We have a problem with
Best, |
BTW, the
|
Some confusion might come from the fact that we dynamically check the
To me, this differentiation makes sense from a Java point of view, but is confusing for JavaScript, as we somewhat mix Doubles and Integers here. |
The inconsistency between integer and double is fixed by This will result in your 5th and 6th test to pass as well. The 4th test ( This will only be part of GraalVM JavaScript as of version 20.2. unfortunately. |
I have a method:
and I try to call it from graal.js via interop:
I don't understand what is the logic behind throwing UnsupportedTypeException - why some values are accepted and others don't? I thought it might be something with IEEE754 spec and only calls for values that can be losslessly converted from double to float are allowed. But this hypothesis doesn't seem to hold, see last example.
The text was updated successfully, but these errors were encountered: