2017-11-23 10:57:38 +00:00
|
|
|
// 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.
|
|
|
|
|
2018-10-01 09:48:52 +00:00
|
|
|
// Flags: --allow-natives-syntax
|
2017-11-23 10:57:38 +00:00
|
|
|
|
|
|
|
function foo() { %_ToLength(42n) }
|
|
|
|
assertThrows(foo, TypeError);
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
assertThrows(foo, TypeError);
|