diff --git a/CHANGELOG.md b/CHANGELOG.md index a2650f0ad0..856b7340bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ See the [Babel Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.m * Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu) +> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors + +More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists) + For example: ```js @@ -29,6 +33,8 @@ function a([ option1, option2 ] = []) { } ``` +The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to. + ### New Feature * Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer)