v8/test/mjsunit/modules-preparse.js
neis 9f5ef0a453 [modules] Never do lazy parsing in modules.
If we want to allow this in the future, we must force context-allocation for all
variables that are declared at the module level but not MODULE-allocated.

R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2373573003
Cr-Commit-Position: refs/heads/master@{#39745}
2016-09-26 23:19:57 +00:00

13 lines
308 B
JavaScript

// Copyright 2016 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.
//
// MODULE
// Flags: --min-preparse-length=0
let foo = 42;
function testFoo(x) { assertEquals(x, foo); }
testFoo(42);
foo++;
testFoo(43);