RESOLVED DUPLICATE of bug 150893 Bug 153977
[ES6] Arrow function syntax. Using eval with 'super'/'super()' in arrow function within the class should not lead to Syntax error
https://bugs.webkit.org/show_bug.cgi?id=153977
Summary [ES6] Arrow function syntax. Using eval with 'super'/'super()' in arrow funct...
GSkachkov
Reported 2016-02-07 23:52:48 PST
Using eval with 'super'/'super()' in arrow function within the class should not lead to Syntax error: const testValue = 'test-value'; class A { constructor() { this.idValue = testValue; } }; class B extends A { constructor (beforeSuper) { var arrow = () => eval('(() => super())()'); arrow(); } }; let b = new B(); b.idValue == testValue; //true
Attachments
GSkachkov
Comment 1 2016-02-28 14:44:06 PST
There is 15.1 https://tc39.github.io/ecma262/#sec-scripts-static-semantics-early-errors that stats: ScriptBody:StatementList #It is a Syntax Error if StatementList Contains super unless the source code containing super is eval code that is being processed by a direct eval that is contained in function code that is not the function code of an ArrowFunction. #It is a Syntax Error if StatementList Contains NewTarget unless the source code containing NewTarget is eval code that is being processed by a direct eval that is contained in function code that is not the function code of an ArrowFunction.
GSkachkov
Comment 2 2016-04-04 13:43:54 PDT
Already implemented in https://bugs.webkit.org/show_bug.cgi?id=150893 *** This bug has been marked as a duplicate of bug 150893 ***
Note You need to log in before you can comment on or make changes to this bug.