0e14baf712
Default parameters have additional declaration block scopes inserted around them when something in the function scope calls eval. This patch sets the parent scope of the expressions introduced due to those defaults to the new block scope. R=adamk BUG=chromium:616386 Review-Url: https://codereview.chromium.org/2077283004 Cr-Commit-Position: refs/heads/master@{#37198}
11 lines
603 B
JavaScript
11 lines
603 B
JavaScript
// Copyright 2016 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: --no-lazy
|
|
|
|
assertEquals(0, ((y = (function(a2) { bbbb = a2 }), bbbb = eval('1')) => {y(0); return bbbb})())
|
|
assertEquals(0, (({y = (function(a2) { bbbb = a2 }), bbbb = eval('1')} = {}) => {y(0); return bbbb})())
|
|
assertEquals(0, (function (y = (function(a2) { bbbb = a2 }), bbbb = eval('1')) {y(0); return bbbb})())
|
|
assertEquals(0, (function ({y = (function(a2) { bbbb = a2 }), bbbb = eval('1')} = {}) {y(0); return bbbb})())
|