>Uh, yes. And it should set `X.prototype.prop` to `2`, because that still is >writable and not affected by the attributes of `x.prop`. > So I would expect `x.prop` to still have the value `1`, shadowing the > prototype property.
I made this mistake as well, jorendorff@ pointed out that SuperProperty references use “this” as the receiver for [[Set]], so it will actually overwrite the value rather than setting it on X.prototype. In the example provided, 5.e.ii is reached, and OrdinaryDefineOwnProperty() should return false and throw. This appears to be V8’s behaviour when testing in Canary (44.0.2375.0) > On Apr 20, 2015, at 2:25 PM, Bergi <[email protected]> wrote: > > Jason Orendorff schrieb: > > […] `super.prop = 2` ends up with O=X.prototype. > > Uh, yes. And it should set `X.prototype.prop` to `2`, because that still is > writable and not affected by the attributes of `x.prop`. So I would expect > `x.prop` to still have the value `1`, shadowing the prototype property. > > (at least that's how I understood super references) > > Bergi > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

