On 2014/08/20 22:16:36, arv wrote:
Is this correctly handling getters?

function Base() {}
Derived.prototype = {
   constructor: Base,
   get x() {
     return this._x;
   },
   _x: 'base'
};

function Derived() {}
Derived.__proto__ = Base;
Derived.prototype = {
   __proto__: Base.prototype,
   constructor: Derived,
   testGetter: function() {
     return super.x;
   }.toMethod(Derived.prototype),
   _x: 'derived'
};

assertEquals('derived', new Derived().testGetter());

No, you are right.

https://codereview.chromium.org/495773002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to