This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged f44efd6 Fix spread operator in ArrayLiterals when nested in other literals BUG=v8:4417 LOG=N R=littledan@chromium.org Review URL: https://codereview.chromium.org/1356913005 . Cr-Commit-Position: refs/branch-heads/4.6@{#22} Cr-Branched-From: 24d34a8-refs/heads/4.6.85@{#1} Cr-Branched-From: 8f44118-refs/heads/master@{#30256}
- Loading branch information
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright 2015 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
// | ||
// Flags: --harmony-spread-arrays | ||
|
||
var arr = [1, 2, 3]; | ||
assertEquals({arr: [1, 2, 3]}, {arr: [...arr]}); | ||
assertEquals([[1, 2, 3]], [[...arr]]); | ||
|
||
assertEquals({arr: [6, 5, [1, 2, 3]]}, {arr: [6, 5, [...arr]]}); | ||
assertEquals([8, 7, [6, 5, [1, 2, 3]]], [8, 7, [6, 5, [...arr]]]); |