[Webkit-unassigned] [Bug 155491] [ES6] Arrow function syntax. Update syntax error text 'super is only valid inside functions' to more suitable

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 19 09:57:19 PDT 2016


Saam Barati <sbarati at apple.com> changed:

           What    |Removed                     |Added
 Attachment #274515|review?                     |review+
              Flags|                            |

--- Comment #3 from Saam Barati <sbarati at apple.com> ---
Comment on attachment 274515
  --> https://bugs.webkit.org/attachment.cgi?id=274515

View in context: https://bugs.webkit.org/attachment.cgi?id=274515&action=review

> Source/JavaScriptCore/parser/Parser.cpp:3847
> +        semanticFailIfFalse(currentScope()->isFunction() || (scopeRef->isEvalContext() && scopeRef->expectedSuperBinding() == SuperBinding::Needed), "super is only valid inside functions or 'eval' inside a function");

I vote for this message:
"'super' is only valid inside a function or an 'eval' inside a function"

Do you know what we do when we have 'super' inside a function not in a class?
It looks like we accept that syntax. Do we throw a runtime error? Should that also
be a syntax error?

> Source/JavaScriptCore/tests/stress/generator-with-super.js:12
> +    //debug(error);


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/20160319/d955afb1/attachment.html>

More information about the webkit-unassigned mailing list