test262/test/language/expressions/object/method-definition/generator-use-strict-with-n...

22 lines
609 B
JavaScript
Raw Normal View History

// 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
description: >
A SyntaxError is thrown if a generator method contains a non-simple parameter list and a UseStrict directive.
info: >
Static Semantics: Early Errors
It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and IsSimpleParameterList of StrictFormalParameters is false.
negative:
phase: early
type: SyntaxError
---*/
var o = {
*m(a = 0) {
"use strict";
}
};