// Copyright (C) 2017 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- desc: > Use of yield as a valid identifier in a function body inside a generator body in non strict mode template: non-strict flags: [noStrict, async] ---*/ //- body return (function(arg) { var yield = arg + 1; return yield; }(yield)) //- assertions var item = iter.next(); item.then(({ done, value }) => { assert.sameValue(done, false); assert.sameValue(value, undefined); }); item = iter.next(42); item.then(({ done, value }) => { assert.sameValue(done, true); assert.sameValue(value, 43); }).then($DONE, $DONE);