2015-12-15 17:33:49 +01:00
|
|
|
// Copyright (C) 2015 André Bargull. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2016-02-22 15:47:03 +01:00
|
|
|
esid: sec-generator-function-definitions-static-semantics-early-errors
|
2015-12-15 17:33:49 +01:00
|
|
|
description: >
|
|
|
|
A SyntaxError is thrown if a generator contains a non-simple parameter list and a UseStrict directive.
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2015-12-15 17:33:49 +01:00
|
|
|
Static Semantics: Early Errors
|
|
|
|
|
|
|
|
It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and IsSimpleParameterList of FormalParameters is false.
|
2016-01-31 00:57:28 +01:00
|
|
|
negative:
|
2017-12-03 06:06:42 +01:00
|
|
|
phase: parse
|
2016-01-31 00:57:28 +01:00
|
|
|
type: SyntaxError
|
2017-10-04 22:12:34 +02:00
|
|
|
features: [generators]
|
2015-12-15 17:33:49 +01:00
|
|
|
---*/
|
|
|
|
|
2018-10-11 16:59:24 +02:00
|
|
|
$DONOTEVALUATE();
|
2017-04-29 22:31:08 +02:00
|
|
|
|
2015-12-15 17:33:49 +01:00
|
|
|
function* f(a = 0) {
|
|
|
|
"use strict";
|
|
|
|
}
|