| Index: test/mjsunit/regress/regress-2691.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/regress/regress-2691.js
|
| similarity index 84%
|
| copy from test/mjsunit/regress/regress-crbug-242870.js
|
| copy to test/mjsunit/regress/regress-2691.js
|
| index 7183375ca811cedc81c870d34e694e98cf727f9b..e17be108146254432ab934d30405c4729171d5fa 100644
|
| --- a/test/mjsunit/regress/regress-crbug-242870.js
|
| +++ b/test/mjsunit/regress/regress-2691.js
|
| @@ -25,19 +25,10 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --allow-natives-syntax
|
| +// Flags: --harmony-generators
|
|
|
| -var non_const_true = true;
|
| +// Check that yield* on non-objects raises a TypeError.
|
|
|
| -function f() {
|
| - return (non_const_true || true && g());
|
| -}
|
| -
|
| -function g() {
|
| - for (;;) {}
|
| -}
|
| -
|
| -assertTrue(f());
|
| -assertTrue(f());
|
| -%OptimizeFunctionOnNextCall(f);
|
| -assertTrue(f());
|
| +assertThrows('(function*() { yield* 10 })().next()', TypeError);
|
| +assertThrows('(function*() { yield* {} })().next()', TypeError);
|
| +assertThrows('(function*() { yield* undefined })().next()', TypeError);
|
|
|