e7cdb615ae
Scoping for initializers is yet incorrect. Defaults are not supported. R=arv@chromium.org,rossberg@chromium.org BUG=v8:811 LOG=N Committed: https://crrev.com/42f30f4ded2b1ca0c4caa7639e6206e93c78ee70 Cr-Commit-Position: refs/heads/master@{#29184} Review URL: https://codereview.chromium.org/1189743003 Cr-Commit-Position: refs/heads/master@{#29192}
18 lines
364 B
JavaScript
18 lines
364 B
JavaScript
// Copyright 2014 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: --allow-natives-syntax
|
|
|
|
function f(x) {
|
|
const x = 0;
|
|
return x;
|
|
}
|
|
|
|
function g(x) {
|
|
return f(x);
|
|
}
|
|
|
|
%OptimizeFunctionOnNextCall(g);
|
|
assertThrows(function() { g(42); }, SyntaxError);
|