2017-10-07 18:03:35 +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-01-12 19:33:13 +00:00
|
|
|
// Flags: --allow-natives-syntax
|
2017-10-07 18:03:35 +00:00
|
|
|
|
|
|
|
async function* gen([[notIterable]] = [null]) {}
|
2019-05-03 12:48:33 +00:00
|
|
|
%PrepareFunctionForOptimization(gen);
|
2017-10-07 18:03:35 +00:00
|
|
|
assertThrows(() => gen(), TypeError);
|
|
|
|
assertThrows(() => gen(), TypeError);
|
|
|
|
%OptimizeFunctionOnNextCall(gen);
|
|
|
|
assertThrows(() => gen(), TypeError);
|