Skip to content
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

examples/mjs index.test.mjs does not error vertx unit no error from example #389

Open
frank-dspeed opened this issue Sep 18, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@frank-dspeed
Copy link

It should error when s is not ==== "value" i did change that and saw no error when running it is there something i am doing wrong?

@frank-dspeed frank-dspeed changed the title examples/mjs index.test.mjs does not error examples/mjs index.test.mjs does not error vertx unit no error from example Sep 30, 2020
@pmlopes pmlopes self-assigned this Oct 1, 2020
@pmlopes pmlopes added the bug Something isn't working label Oct 1, 2020
@frank-dspeed
Copy link
Author

maybe related infos:

HostedObjects are compared by reference currently. Is there any workaround to change this behavior and call .equals instead? I found the thread on gitter that suggests that it was considered a year ago. What was the outcome? Is it still planned?
https://gitter.im/graalvm/graaljs?at=5d22f9a83b186e6569683f45

Ghost @ghost529c6cf4ed5ab0b3bf04da61 Jul 08 2019 00:47
I'm having a problem with equality. If I compare Java objects that I pass into JS with == and ===, my .equals method is not called
Is == always mapped to reference equality?
Ghost @ghost
529c6cf4ed5ab0b3bf04da61 Jul 08 2019 01:07
I've been stepping with the debugger through the JSRuntime, and found this line of code: https://github.com/oracle/graal/blob/97c9fe405b077d7addd5e4f82290bb3b345b1727/truffle/src/com.oracle.truffle.polyglot/src/com/oracle/truffle/polyglot/HostObject.java#L983
shouldn't this be .equals?
Christian Humer @chumer Jul 08 2019 05:00
@larsrh yes. This should become equals in the future. We have plans to change this soon. It is not quite the easy fix it looks like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants