reactiverse / es4x

🚀 fast JavaScript 4 Eclipse Vert.x
https://reactiverse.io/es4x/
Apache License 2.0
876 stars 75 forks source link

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

Open frank-dspeed opened 3 years ago

frank-dspeed commented 3 years ago

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 commented 3 years ago

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 @ghost~529c6cf4ed5ab0b3bf04da61 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