test262/test/language/statements/generators/yield-as-function-expression-binding-identifier.js
Mike Pennisi e14060bffb Add asertions for Generator Statement syntax tests
Ensure that these forms result in objects that meet basic expectations
about generator functions.
2015-04-14 16:22:12 -04:00

21 lines
469 B
JavaScript

// Copyright (C) 2013 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
`yield` may be used as the binding identifier of a function expression
within generator bodies.
es6id: 14.1
flags: [noStrict]
---*/
var result;
function* g() {
(function yield() {})
}
result = g().next();
assert.sameValue(result.value, undefined);
assert.sameValue(result.done, true);