Skip to content

Conversation

@zhurvla
Copy link
Contributor

@zhurvla zhurvla commented Sep 10, 2025

The following should work in > ES6 mode, and throw a SyntaxError: Property "foo" already defined in this object literal. in pre-es6 mode:

(function() {
'use strict';
o = {foo: 1, foo: 2};
o.foo
})();

@rbri
Copy link
Collaborator

rbri commented Sep 11, 2025

LGTM but i like to vote for two more tests testing this once for ES6 and once for below. I think this will make our live easier in the long run

@zhurvla
Copy link
Contributor Author

zhurvla commented Sep 16, 2025

@rbri Tests added

@rbri rbri merged commit 0c5f5be into mozilla:master Sep 17, 2025
3 checks passed
@rbri
Copy link
Collaborator

rbri commented Sep 17, 2025

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants