v8/test/mjsunit/harmony/async-for-of-non-iterable.js
Adam Klein 49898aad76 Remove always-true --harmony-async-iteration runtime flag
It was shipped in Chrome 63.

Bug: v8:5855
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Icc00b8300622d1c7b5662be8ac5e425b9781f666
Reviewed-on: https://chromium-review.googlesource.com/858381
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50558}
2018-01-12 20:14:34 +00:00

21 lines
442 B
JavaScript

// 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.
var done = false;
async function f() {
try {
for await ([a] of {}) {
UNREACHABLE();
}
UNREACHABLE();
} catch (e) {
assertEquals(e.message, "{} is not async iterable");
done = true;
}
}
f();
assertTrue(done);