[Webkit-unassigned] [Bug 150893] [ES6] Arrow function syntax. Using 'super' in arrow function that declared out of the class should lead to Syntax error
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 5 15:03:45 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=150893
--- Comment #8 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 270654
--> https://bugs.webkit.org/attachment.cgi?id=270654
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=270654&action=review
> Source/JavaScriptCore/ChangeLog:20
> + Invoking super()/super in two or more evals will be part of the issue https://bugs.webkit.org/show_bug.cgi?id=153864
what kind of error should this be if it's not a SyntaxError?
> Source/JavaScriptCore/bytecode/EvalCodeCache.h:70
> + wrappedCodeBlockDerivedContextType = superBinding == SuperBinding::Needed
> + ? DerivedContextType::DerivedMethodContext
> + : derivedContextType;
style: make this one line or add "{}" to the else statement.
> Source/JavaScriptCore/bytecode/ExecutableInfo.h:67
> + DerivedContextType wrappedCodeBlocContextType() const { return static_cast<DerivedContextType>(m_wrappedCodeBlocContextType); }
typo:
wrappedCodeBlocContextType => wrappedCodeBlockContextType
> Source/JavaScriptCore/parser/Parser.cpp:2070
> + if (!m_lexer->isReparsingFunction()) {
Is this needed or just an optimization?
> Source/JavaScriptCore/parser/Parser.h:881
> + // Find the closest not 'arrow function' function scope.
comment not needed.
> Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-superproperty.js:-131
> - getParentValueWithError() {
> - var f = function () {
> - return () => super.getValue();
> - };
> - return f();
> - }
you could keep this if you turned this into an "return eval(blah)"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160205/8acec1c9/attachment-0001.html>
More information about the webkit-unassigned
mailing list