2014-11-26 16:32:37 +00:00
|
|
|
// 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.
|
|
|
|
|
2016-01-11 23:09:27 +00:00
|
|
|
// Flags: --allow-natives-syntax --legacy-const
|
2014-11-26 16:32:37 +00:00
|
|
|
|
|
|
|
function f(x) {
|
|
|
|
const x = 0;
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
|
|
|
function g(x) {
|
|
|
|
return f(x);
|
|
|
|
}
|
|
|
|
|
|
|
|
%OptimizeFunctionOnNextCall(g);
|
2015-06-22 14:15:53 +00:00
|
|
|
assertThrows(function() { g(42); }, SyntaxError);
|