v8/test/mjsunit/function-length-accessor.js
ulan@chromium.org 72358c7fed Convert function.length to API-style accessor.
TEST=mjsunit/function-length-accessor
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/257423009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-24 11:24:13 +00:00

36 lines
1.4 KiB
JavaScript

// Copyright 2014 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: --harmony-scoping
function foo(a, b, c, d) {
"use strict"
const x = 10;
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
// long comment to trigger lazy compilation.
x = 20; // This will trigger compile error with harmony scoping.
}
assertThrows("foo.length()");