[Webkit-unassigned] [Bug 163162] New: Arrow functions with concise bodies cannot return regular expressions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 7 18:43:56 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=163162

            Bug ID: 163162
           Summary: Arrow functions with concise bodies cannot return
                    regular expressions
    Classification: Unclassified
           Product: WebKit
           Version: Safari 10
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bakkot at gmail.com

For example, the following throws an error, despite being a perfectly legal program:

(()=>/a/)();

The error is
Exception: SyntaxError: Unexpected token '/'. Invalid regular expression.

If the function is not invoked (e.g. `(()=>/a/);`) no error is thrown.

Presumably related is the fact that `(()=>/a/).toString()` gives '()=>/'.

-- 
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/20161008/60f18ad5/attachment.html>


More information about the webkit-unassigned mailing list