Run the materialized literal reindexer on default parameter initializers
R=rossberg@chromium.org BUG=chromium:554865 LOG=n Review URL: https://codereview.chromium.org/1442653004 Cr-Commit-Position: refs/heads/master@{#31989}
This commit is contained in:
parent
20f3a07782
commit
e971005638
@ -4148,6 +4148,7 @@ void ParserTraits::ReindexLiterals(const ParserFormalParameters& parameters) {
|
||||
|
||||
for (const auto p : parameters.params) {
|
||||
if (p.pattern != nullptr) reindexer.Reindex(p.pattern);
|
||||
if (p.initializer != nullptr) reindexer.Reindex(p.initializer);
|
||||
}
|
||||
|
||||
if (parameters.has_rest) {
|
||||
|
10
test/mjsunit/regress/regress-554865.js
Normal file
10
test/mjsunit/regress/regress-554865.js
Normal file
@ -0,0 +1,10 @@
|
||||
// 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-default-parameters
|
||||
|
||||
(function() {
|
||||
var x = {};
|
||||
((y = [42]) => assertEquals(42, y[0]))();
|
||||
})();
|
Loading…
Reference in New Issue
Block a user