Base value of super reference doesn't indicates prototype object of super class
Yusuke Suzuki
utatane.tea at gmail.com
Fri Jun 29 19:04:29 PDT 2012
Hello all,
I think that I found a issue on super reference of current draft.
In the current draft, Super Reference is made with base value is result of
calling GetHomeObject of env.
But, HomeObject is prototype of child class, so we cannot find method of
superclass.
So for example,
class B {
say() {
console.log('b');
}
};
class D extends B {
say() {
console.log('d');
super();
}
};
let instance = new D;
instance.say();
then, because base of super reference becomes D.prototype, console.log('d')
is executed recursively and max recursion limit exceeded error is thrown.
So I suggest that using baseValue.[[Prototype]] for base of super reference.
If I missed something, I would appreciate it if you would inform me.
Regards,
Yusuke Suzuki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120630/b44861ee/attachment.html>
More information about the es-discuss
mailing list