5a72c6b69b
Change-Id: I83dc3bed644361be1b94063daefd890b10ba50cd Reviewed-on: https://chromium-review.googlesource.com/c/1433772 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#59095}
18 lines
497 B
JavaScript
18 lines
497 B
JavaScript
// Copyright 2019 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.
|
|
|
|
assertThrows(`
|
|
{
|
|
function a() {}
|
|
}
|
|
|
|
{
|
|
// Duplicate lexical declarations are only allowed if they are both sloppy
|
|
// block functions (see bug 4693). In this case the sloppy block function
|
|
// conflicts with the lexical variable declaration, causing a syntax error.
|
|
let a;
|
|
function a() {};
|
|
}
|
|
`, SyntaxError)
|