super.prop assignment can silently overwrite non-writable properties

Bergi a.d.bergi at web.de
Mon Apr 20 18:25:33 UTC 2015


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


More information about the es-discuss mailing list