blob: 97c9f65822098465e30bb44dc548b3ecc915c3d0 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Emily Bernierd0a1eb72015-03-24 16:35:39 -04005// Flags: --harmony-scoping --lazy
Ben Murdochb8a8cc12014-11-26 15:28:44 +00006
7function foo(a, b, c, d) {
8 "use strict"
9 const x = 10;
10 // long comment to trigger lazy compilation.
11 // long comment to trigger lazy compilation.
12 // long comment to trigger lazy compilation.
13 // long comment to trigger lazy compilation.
14 // long comment to trigger lazy compilation.
15 // long comment to trigger lazy compilation.
16 // long comment to trigger lazy compilation.
17 // long comment to trigger lazy compilation.
18 // long comment to trigger lazy compilation.
19 // long comment to trigger lazy compilation.
20 // long comment to trigger lazy compilation.
21 // long comment to trigger lazy compilation.
22 // long comment to trigger lazy compilation.
23 // long comment to trigger lazy compilation.
24 // long comment to trigger lazy compilation.
25 // long comment to trigger lazy compilation.
26 // long comment to trigger lazy compilation.
27 // long comment to trigger lazy compilation.
28 // long comment to trigger lazy compilation.
29 // long comment to trigger lazy compilation.
30 // long comment to trigger lazy compilation.
31 // long comment to trigger lazy compilation.
32 x = 20; // This will trigger compile error with harmony scoping.
33}
34
35assertThrows("foo.length()");