We need support following case in lexical bind arguments in arrow function: class B { gen() { return 42; } } class A extends B { *gen() { let arr = () => super.gen(); return arr(); } } typeof a.gen().next() === 'array';
We are already supporting arguments in arrow function in generators. Modified test example: var result = 'some-value'; class B { gen() { return result; } } class A extends B { *gen() { let arr = () => super.gen(); return arr(); } } var a = new A(); a.gen().next().value === result; //Should be true now it is : SyntaxErorr: super can only be used in a method of a derived class
Created attachment 272737 [details] Patch Patch comming
Comment on attachment 272737 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=272737&action=review Nice catch. The approach looks nice. A few nits. > Source/JavaScriptCore/parser/Parser.h:939 > { This function should be renamed to represent the returned scope is not generator's scope. And please note that this function skips arrow function and generator, but it does not skip generator function. > Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-superproperty.js:147 > + } Could you add tests like method() { function *gen() { let arr = () => super.getValue(); arr(); } } This should be SyntaxError.
Committed r197554: <http://trac.webkit.org/changeset/197554>
All reviewed patches have been landed. Closing bug.