92cd4d1ea2
When preparsing and detecting a sloppy block function redefinition then don't mark the variable as assigned to make it consistent with the eager parser. Bug: chromium:1053364 Change-Id: Iec7c24db80014bfe73ee41a4f3bb7a41a354cef2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2241511 Auto-Submit: Dan Elphick <delphick@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#68415}
21 lines
342 B
JavaScript
21 lines
342 B
JavaScript
// Copyright 2020 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: --throws
|
|
|
|
function main() {
|
|
function g() {
|
|
function h() {
|
|
f;
|
|
}
|
|
{
|
|
function f() {}
|
|
}
|
|
f;
|
|
throw new Error();
|
|
}
|
|
g();
|
|
}
|
|
main();
|