Yes, good catch. This is a change, and it is now allowed.
On Fri, Jun 20, 2014 at 1:48 AM, Andy Wingo <[email protected]> wrote: > On Thu 19 Jun 2014 18:02, "Mark S. Miller" <[email protected]> writes: > > > Yes. For both strict and sloppy, for both static/literal and > > dynamic/computed, duplicate property names/symbols in object literals > > are no longer an error. Instead, in left-to-right order, each cause the > > equivalent of a [[DefineOwnProperty]] on the new object, so that > > rightward definitions silently overwrite conflicting leftward > > definitions. This should not result in any change to sloppy literals. It > > just makes strict literals, regarding this issue alone, act like sloppy > > literals. (Once we have a way to express that a property is to be > > initialized to a non-configurable state, we'll need to revisit this. But > > that's after ES6.) > > There is one change: > > ({ foo: 3, get foo() { return 4 } }) > > This is not allowed with current sloppy mode. Are you proposing that it > be allowed, given that this situation may arise with computed property > names: > > ({ ['foo']: 3, get foo() { return 4 } }) > > or > > ({ foo: 3, get ['foo']() { return 4 } }) > > Andy > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

