v8/test/mjsunit/regress/regress-890553.js
Florian Sattler 563eeec64c [parser] Fix function name variable tracking
Delay the creation of FunctionNameVariables until we validated the
FormalParameters. This is needed so we don't declare them in cases where
we later get an error, have to reset, and reparse.

Bug: chromium:890553, v8:7926
Change-Id: I742e6f7f71158e3903843bd583dc7943468c18f6
Reviewed-on: https://chromium-review.googlesource.com/1254061
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56314}
2018-10-01 13:14:33 +00:00

12 lines
355 B
JavaScript

// Copyright 2018 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.
"use strict";
var s = "function __f_9(func, testName) {" +
"var __v_0 = function __f_10(__v_14, __v_14) {" +
" return __v_16;" +
"}; " +
"}"
assertThrows(function() { eval(s); });