Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

In assignments, property keys should be evaluated only after checking the object is not null #1600

Open
andreabergia opened this issue Aug 30, 2024 · 0 comments
Labels
bug Issues considered a bug Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec

Comments

@andreabergia
Copy link
Contributor

This should throw a TypeError because we are accessing null, but instead it is throwing a MyError:

function MyError() {}
MyError.prototype.toString = () => 'MyError';

var base = null;
var prop = {
    toString: function() {
        throw new MyError();
    }
  };
 
base[prop] = 42;
@p-bakker p-bakker added Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec bug Issues considered a bug labels Aug 30, 2024
@p-bakker p-bakker added this to the Release 1.7.16 milestone Oct 3, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Issues considered a bug Ecma Incompatibility Issues about Rhino being incompatible with the EcmaScript spec
Projects
None yet
Development

No branches or pull requests

2 participants