[Webkit-unassigned] [Bug 152721] New: Spread operator should be allowed when not the first argument of parameter list

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 4 17:36:16 PST 2016


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

            Bug ID: 152721
           Summary: Spread operator should be allowed when not the first
                    argument of parameter list
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: ggaren at apple.com, sbarati at apple.com,
                    utatane.tea at gmail.com,
                    webkit-bug-importer at group.apple.com

* SUMMARY
Spread operator should be allowed when not the first argument of parameter list.

* TEST
<script>
function foo() { return Array.from(arguments); }
foo(...[1,2]); // Good: [1, 2]
foo(0, ...[1,2]); // Expected: [0, 1, 2], Actual: SyntaxError: Unexpected token '...'
</script>

* NOTES
- Firefox and Chrome both behave as expected

-- 
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/20160105/b1c03244/attachment.html>


More information about the webkit-unassigned mailing list