Generator parameters must not contain yield expressions #1706

ariya opened this Issue Jan 3, 2017 · 0 comments


None yet

1 participant

ariya commented Jan 3, 2017

(As reported by @michaelficarra as case 17 in #1502)

Test case:

esprima.parse('function *g(x = yield){}');

Actual: a valid syntax tree.

Expected: a thrown exception indicating a syntax error.

Following V8 error messages, the exception message should be "Yield expression not allowed in formal parameter".

@ariya ariya added defect es6 labels Jan 3, 2017
@ariya ariya referenced this issue Jan 4, 2017

invalid tests #1502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment