v8/test/mjsunit/regress/regress-6509.js
Adam Klein 4c79544cca [ast] AstTraversalVisitor should visit the Declarations of Block scopes
R=marja@chromium.org

Bug: v8:6509
Change-Id: If8be12e2ce6c00de0bdee38ab721ef5b7b47efe5
Reviewed-on: https://chromium-review.googlesource.com/556239
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46331}
2017-06-29 17:51:22 +00:00

25 lines
479 B
JavaScript

// Copyright 2017 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.
(function testSloppy() {
var arrow = (sth = (function f() {
{
function f2() { }
}
})()) => 0;
assertEquals(0, arrow());
})();
(function testStrict() {
"use strict";
var arrow = (sth = (function f() {
{
function f2() { }
}
})()) => 0;
assertEquals(0, arrow());
})();