In the current draft, Super Reference is made with base value is result of
calling GetHomeObject of env.
But, HomeObject is prototype of derived class, we cannot find method of
superclass.
So for example,
class Base {
say() {
console.log('base');
}
};
class Derived extends Base {
say() {
console.log('derived');
super();
}
};
let instance = new Derived;
instance.say();
then, because base of super reference becomes Derived.prototype,
console.log('derived') 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.
P.S.
This is 4th mail I sent because 3 mails are blocked 12 hours ago. Sorry if
3 duplicate mails are delivered after this mail.
,
Yusuke Suzuki
Hello everyone,
In the current draft, Super Reference is made with base value is result of
calling GetHomeObject of env.
But, HomeObject is prototype of derived class, we cannot find method of
superclass.
So for example,
class Base {
say() {
console.log('base');
}
};
class Derived extends Base {
say() {
console.log('derived');
super();
}
};
let instance = new Derived;
instance.say();
then, because base of super reference becomes Derived.prototype,
console.log('derived') 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.
P.S.
This is 4th mail I sent because 3 mails are blocked 12 hours ago. Sorry if
3 duplicate mails are delivered after this mail.
Regards,
Yusuke Suzuki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120629/1d3d279b/attachment.html>
Hello everyone,
In the current draft, Super Reference is made with base value is result of calling GetHomeObject of env. But, HomeObject is prototype of derived class, we cannot find method of superclass.
So for example,
class Base { say() { console.log('base'); } };
class Derived extends Base { say() { console.log('derived'); super(); } };
let instance = new Derived;
instance.say();
then, because base of super reference becomes Derived.prototype, console.log('derived') 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.
P.S. This is 4th mail I sent because 3 mails are blocked 12 hours ago. Sorry if 3 duplicate mails are delivered after this mail.
, Yusuke Suzuki