diff --git a/src/messages.ts b/src/messages.ts index 31d5d1e9a..befad1b14 100644 --- a/src/messages.ts +++ b/src/messages.ts @@ -51,7 +51,6 @@ export const Messages = { StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', StrictModeWith: 'Strict mode code may not include a with statement', StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', StrictReservedWord: 'Use of future reserved word in strict mode', StrictVarName: 'Variable name may not be eval or arguments in strict mode', diff --git a/src/parser.ts b/src/parser.ts index f0eca2230..39d4f9b21 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -20,7 +20,7 @@ interface Context { allowIn: boolean; allowStrictDirective: boolean; allowYield: boolean; - await: boolean; + isAsync: boolean; firstCoverInitializedNameError: RawToken | null; isAssignmentTarget: boolean; isBindingElement: boolean; @@ -144,7 +144,7 @@ export class Parser { this.context = { isModule: false, - await: false, + isAsync: false, allowIn: true, allowStrictDirective: true, allowYield: true, @@ -621,7 +621,7 @@ export class Parser { switch (this.lookahead.type) { case Token.Identifier: - if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') { + if ((this.context.isModule || this.context.isAsync) && this.lookahead.value === 'await') { this.tolerateUnexpectedToken(this.lookahead); } expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); @@ -796,18 +796,14 @@ export class Parser { const node = this.createNode(); const previousAllowYield = this.context.allowYield; - const previousAwait = this.context.await; + const previousIsAsync = this.context.isAsync; this.context.allowYield = false; - this.context.await = true; + this.context.isAsync = true; const params = this.parseFormalParameters(); - if (params.message === Messages.StrictParamDupe) { - this.throwError(Messages.DuplicateParameter); - } - const method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; - this.context.await = previousAwait; + this.context.isAsync = previousIsAsync; return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method, isGenerator)); } @@ -1567,7 +1563,7 @@ export class Parser { } this.context.isAssignmentTarget = false; this.context.isBindingElement = false; - } else if (this.context.await && this.matchContextualKeyword('await')) { + } else if (this.context.isAsync && this.matchContextualKeyword('await')) { expr = this.parseAwaitExpression(); } else { expr = this.parseUpdateExpression(); @@ -1798,9 +1794,9 @@ export class Parser { } } - if (options.message === Messages.StrictParamDupe) { + if (options.hasDuplicateParameterNames) { const token = this.context.strict ? options.stricted : options.firstRestricted; - this.throwUnexpectedToken(token, options.message); + this.throwUnexpectedToken(token, Messages.DuplicateParameter); } return { @@ -1853,9 +1849,9 @@ export class Parser { this.context.allowStrictDirective = list.simple; const previousAllowYield = this.context.allowYield; - const previousAwait = this.context.await; + const previousIsAsync = this.context.isAsync; this.context.allowYield = true; - this.context.await = isAsync; + this.context.isAsync = isAsync; const node = this.startNode(startToken); this.expect('=>'); @@ -1882,7 +1878,7 @@ export class Parser { this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; this.context.allowYield = previousAllowYield; - this.context.await = previousAwait; + this.context.isAsync = previousIsAsync; } } else { @@ -2233,7 +2229,7 @@ export class Parser { this.throwUnexpectedToken(token); } } - } else if ((this.context.isModule || this.context.await) && token.type === Token.Identifier && token.value === 'await') { + } else if ((this.context.isModule || this.context.isAsync) && token.type === Token.Identifier && token.value === 'await') { this.tolerateUnexpectedToken(token); } @@ -2403,7 +2399,7 @@ export class Parser { const node = this.createNode(); this.expectKeyword('for'); if (this.matchContextualKeyword('await')) { - if (!this.context.await) { + if (!this.context.isAsync) { this.tolerateUnexpectedToken(this.lookahead); } _await = true; @@ -2975,7 +2971,7 @@ export class Parser { } if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { options.stricted = param; - options.message = Messages.StrictParamDupe; + options.hasDuplicateParameterNames = true; } } else if (!options.firstRestricted) { if (this.scanner.isRestrictedWord(name)) { @@ -2986,7 +2982,7 @@ export class Parser { options.message = Messages.StrictReservedWord; } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { options.stricted = param; - options.message = Messages.StrictParamDupe; + options.hasDuplicateParameterNames = true; } } @@ -3026,6 +3022,7 @@ export class Parser { parseFormalParameters(firstRestricted?) { const options: any = { simple: true, + hasDuplicateParameterNames: false, params: [], firstRestricted: firstRestricted }; @@ -3046,6 +3043,12 @@ export class Parser { } this.expect(')'); + if (options.hasDuplicateParameterNames) { + if (this.context.strict || this.context.isAsync || !options.simple) { + this.throwError(Messages.DuplicateParameter); + } + } + return { simple: options.simple, params: options.params, @@ -3109,16 +3112,12 @@ export class Parser { } } - const previousAllowAwait = this.context.await; + const previousIsAsync = this.context.isAsync; const previousAllowYield = this.context.allowYield; - this.context.await = isAsync; + this.context.isAsync = isAsync; this.context.allowYield = !isGenerator; const formalParameters = this.parseFormalParameters(firstRestricted); - if (isGenerator && formalParameters.message === Messages.StrictParamDupe) { - this.throwError(Messages.DuplicateParameter); - } - const params = formalParameters.params; const stricted = formalParameters.stricted; firstRestricted = formalParameters.firstRestricted; @@ -3139,7 +3138,7 @@ export class Parser { this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; - this.context.await = previousAllowAwait; + this.context.isAsync = previousIsAsync; this.context.allowYield = previousAllowYield; return isAsync @@ -3166,9 +3165,9 @@ export class Parser { let id: Node.Identifier | null = null; let firstRestricted; - const previousAllowAwait = this.context.await; + const previousIsAsync = this.context.isAsync; const previousAllowYield = this.context.allowYield; - this.context.await = isAsync; + this.context.isAsync = isAsync; this.context.allowYield = !isGenerator; if (!this.match('(')) { @@ -3190,12 +3189,6 @@ export class Parser { } const formalParameters = this.parseFormalParameters(firstRestricted); - if (formalParameters.message === Messages.StrictParamDupe) { - if (isGenerator || isAsync) { - this.throwError(Messages.DuplicateParameter); - } - } - const params = formalParameters.params; const stricted = formalParameters.stricted; firstRestricted = formalParameters.firstRestricted; @@ -3215,7 +3208,7 @@ export class Parser { } this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; - this.context.await = previousAllowAwait; + this.context.isAsync = previousIsAsync; this.context.allowYield = previousAllowYield; return isAsync diff --git a/test/fixtures/ES6/arrow-function/array-binding-pattern/invalid-dup-param.failure.json b/test/fixtures/ES6/arrow-function/array-binding-pattern/invalid-dup-param.failure.json deleted file mode 100644 index 308e25b9e..000000000 --- a/test/fixtures/ES6/arrow-function/array-binding-pattern/invalid-dup-param.failure.json +++ /dev/null @@ -1 +0,0 @@ -{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Strict mode function may not have duplicate parameter names","description":"Strict mode function may not have duplicate parameter names"} \ No newline at end of file diff --git a/test/fixtures/ES6/arrow-function/invalid-duplicated-names-rest-parameter.failure.json b/test/fixtures/ES6/arrow-function/invalid-duplicated-names-rest-parameter.failure.json deleted file mode 100644 index 3ecda33d0..000000000 --- a/test/fixtures/ES6/arrow-function/invalid-duplicated-names-rest-parameter.failure.json +++ /dev/null @@ -1 +0,0 @@ -{"index":10,"lineNumber":1,"column":11,"message":"Error: Line 1: Strict mode function may not have duplicate parameter names","description":"Strict mode function may not have duplicate parameter names"} \ No newline at end of file diff --git a/test/fixtures/ES6/arrow-function/invalid-duplicated-params.failure.json b/test/fixtures/ES6/arrow-function/invalid-duplicated-params.failure.json deleted file mode 100644 index 0509c176f..000000000 --- a/test/fixtures/ES6/arrow-function/invalid-duplicated-params.failure.json +++ /dev/null @@ -1 +0,0 @@ -{"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Strict mode function may not have duplicate parameter names","description":"Strict mode function may not have duplicate parameter names"} \ No newline at end of file diff --git a/test/fixtures/ES6/binding-pattern/array-pattern/dupe-param.failure.json b/test/fixtures/ES6/binding-pattern/array-pattern/dupe-param.failure.json new file mode 100644 index 000000000..cd12ba9fe --- /dev/null +++ b/test/fixtures/ES6/binding-pattern/array-pattern/dupe-param.failure.json @@ -0,0 +1 @@ +{"index":31,"lineNumber":2,"column":18,"message":"Error: Line 2: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} \ No newline at end of file diff --git a/test/fixtures/ES6/binding-pattern/array-pattern/dupe-param.tree.json b/test/fixtures/ES6/binding-pattern/array-pattern/dupe-param.tree.json deleted file mode 100644 index 67ef0d2b6..000000000 --- a/test/fixtures/ES6/binding-pattern/array-pattern/dupe-param.tree.json +++ /dev/null @@ -1,1212 +0,0 @@ -{ - "type": "Program", - "body": [ - { - "range": [ - 0, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - }, - "type": "ExpressionStatement", - "expression": { - "range": [ - 0, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "type": "Literal", - "value": "use strict", - "raw": "\"use strict\"" - }, - "directive": "use strict" - }, - { - "range": [ - 14, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 20 - } - }, - "type": "FunctionDeclaration", - "id": { - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - }, - "type": "Identifier", - "name": "a" - }, - "params": [ - { - "range": [ - 25, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 16 - } - }, - "type": "ArrayPattern", - "elements": [ - { - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 13 - } - }, - "type": "Identifier", - "name": "a" - }, - { - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - }, - "type": "Identifier", - "name": "a" - } - ] - } - ], - "body": { - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 20 - } - }, - "type": "BlockStatement", - "body": [] - }, - "generator": false, - "expression": false, - "async": false - }, - { - "range": [ - 35, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 23 - } - }, - "type": "FunctionDeclaration", - "id": { - "range": [ - 44, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 10 - } - }, - "type": "Identifier", - "name": "a" - }, - "params": [ - { - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - }, - "type": "ArrayPattern", - "elements": [ - { - "range": [ - 47, - 48 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 13 - } - }, - "type": "Identifier", - "name": "a" - }, - { - "range": [ - 49, - 53 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 18 - } - }, - "type": "RestElement", - "argument": { - "range": [ - 52, - 53 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 18 - } - }, - "type": "Identifier", - "name": "a" - } - } - ] - } - ], - "body": { - "range": [ - 55, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 23 - } - }, - "type": "BlockStatement", - "body": [] - }, - "generator": false, - "expression": false, - "async": false - }, - { - "range": [ - 59, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 25 - } - }, - "type": "FunctionDeclaration", - "id": { - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - }, - "type": "Identifier", - "name": "a" - }, - "params": [ - { - "range": [ - 70, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 21 - } - }, - "type": "ArrayPattern", - "elements": [ - { - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 15 - } - }, - "type": "ObjectPattern", - "properties": [ - { - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 14 - } - }, - "type": "Property", - "key": { - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 14 - } - }, - "type": "Identifier", - "name": "a" - }, - "computed": false, - "value": { - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 14 - } - }, - "type": "Identifier", - "name": "a" - }, - "kind": "init", - "method": false, - "shorthand": true - } - ] - }, - { - "range": [ - 75, - 79 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - }, - "type": "RestElement", - "argument": { - "range": [ - 78, - 79 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - }, - "type": "Identifier", - "name": "a" - } - } - ] - } - ], - "body": { - "range": [ - 81, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 25 - } - }, - "type": "BlockStatement", - "body": [] - }, - "generator": false, - "expression": false, - "async": false - } - ], - "sourceType": "script", - "tokens": [ - { - "type": "String", - "value": "\"use strict\"", - "range": [ - 0, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - { - "type": "Punctuator", - "value": ";", - "range": [ - 12, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": "Keyword", - "value": "function", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 24, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - { - "type": "Punctuator", - "value": "[", - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - { - "type": "Punctuator", - "value": ",", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - { - "type": "Punctuator", - "value": "]", - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 33, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - { - "type": "Keyword", - "value": "function", - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 44, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 45, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - { - "type": "Punctuator", - "value": "[", - "range": [ - 46, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 47, - 48 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - { - "type": "Punctuator", - "value": ",", - "range": [ - 48, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - { - "type": "Punctuator", - "value": "...", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 52, - 53 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - { - "type": "Punctuator", - "value": "]", - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 54, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 55, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 57, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - { - "type": "Keyword", - "value": "function", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - { - "type": "Punctuator", - "value": "[", - "range": [ - 70, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 73, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - { - "type": "Punctuator", - "value": ",", - "range": [ - 74, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - { - "type": "Punctuator", - "value": "...", - "range": [ - 75, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 78, - 79 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "Punctuator", - "value": "]", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 80, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 83, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "errors": [ - { - "index": 28, - "lineNumber": 2, - "column": 15, - "message": "Error: Line 2: Strict mode function may not have duplicate parameter names" - }, - { - "index": 52, - "lineNumber": 3, - "column": 18, - "message": "Error: Line 3: Strict mode function may not have duplicate parameter names" - }, - { - "index": 78, - "lineNumber": 4, - "column": 20, - "message": "Error: Line 4: Strict mode function may not have duplicate parameter names" - } - ], - "range": [ - 0, - 84 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 25 - } - } -} diff --git a/test/fixtures/declaration/function/dupe-param.failure.json b/test/fixtures/declaration/function/dupe-param.failure.json new file mode 100644 index 000000000..892249971 --- /dev/null +++ b/test/fixtures/declaration/function/dupe-param.failure.json @@ -0,0 +1 @@ +{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} \ No newline at end of file diff --git a/test/fixtures/declaration/function/dupe-param.tree.json b/test/fixtures/declaration/function/dupe-param.tree.json deleted file mode 100644 index 34223c23f..000000000 --- a/test/fixtures/declaration/function/dupe-param.tree.json +++ /dev/null @@ -1,360 +0,0 @@ -{ - "type": "Program", - "body": [ - { - "range": [ - 0, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 32 - } - }, - "type": "FunctionDeclaration", - "id": { - "range": [ - 9, - 10 - ], - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - } - }, - "type": "Identifier", - "name": "a" - }, - "params": [ - { - "range": [ - 11, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - } - }, - "type": "Identifier", - "name": "x" - }, - { - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 15 - } - }, - "type": "Identifier", - "name": "x" - } - ], - "body": { - "range": [ - 17, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 32 - } - }, - "type": "BlockStatement", - "body": [ - { - "range": [ - 18, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 31 - } - }, - "type": "ExpressionStatement", - "expression": { - "range": [ - 18, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "type": "Literal", - "value": "use strict", - "raw": "'use strict'" - }, - "directive": "use strict" - } - ] - }, - "generator": false, - "expression": false, - "async": false - } - ], - "sourceType": "script", - "tokens": [ - { - "type": "Keyword", - "value": "function", - "range": [ - 0, - 8 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - { - "type": "Identifier", - "value": "a", - "range": [ - 9, - 10 - ], - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 10, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 10 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - { - "type": "Identifier", - "value": "x", - "range": [ - 11, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - { - "type": "Punctuator", - "value": ",", - "range": [ - 12, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": "Identifier", - "value": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 17, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - { - "type": "String", - "value": "'use strict'", - "range": [ - 18, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - { - "type": "Punctuator", - "value": ";", - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 30 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 31 - }, - "end": { - "line": 1, - "column": 32 - } - } - } - ], - "errors": [ - { - "index": 14, - "lineNumber": 1, - "column": 15, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" - } - ], - "range": [ - 0, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 32 - } - } -} diff --git a/test/fixtures/invalid-syntax/migrated_0092.failure.json b/test/fixtures/invalid-syntax/migrated_0092.failure.json deleted file mode 100644 index 5bf635c2e..000000000 --- a/test/fixtures/invalid-syntax/migrated_0092.failure.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "index": 6, - "lineNumber": 1, - "column": 7, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file diff --git a/test/fixtures/invalid-syntax/migrated_0093.failure.json b/test/fixtures/invalid-syntax/migrated_0093.failure.json deleted file mode 100644 index 13ab24c2b..000000000 --- a/test/fixtures/invalid-syntax/migrated_0093.failure.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "index": 20, - "lineNumber": 1, - "column": 21, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file diff --git a/test/fixtures/invalid-syntax/migrated_0240.failure.json b/test/fixtures/invalid-syntax/migrated_0240.failure.json index be67bccf4..892249971 100644 --- a/test/fixtures/invalid-syntax/migrated_0240.failure.json +++ b/test/fixtures/invalid-syntax/migrated_0240.failure.json @@ -1,6 +1 @@ -{ - "index": 14, - "lineNumber": 1, - "column": 15, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file +{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} \ No newline at end of file diff --git a/test/fixtures/invalid-syntax/migrated_0243.failure.json b/test/fixtures/invalid-syntax/migrated_0243.failure.json index 2cb3f113d..529a07dc8 100644 --- a/test/fixtures/invalid-syntax/migrated_0243.failure.json +++ b/test/fixtures/invalid-syntax/migrated_0243.failure.json @@ -1,6 +1 @@ -{ - "index": 43, - "lineNumber": 1, - "column": 44, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file +{"index":45,"lineNumber":1,"column":46,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} \ No newline at end of file diff --git a/test/fixtures/invalid-syntax/migrated_0244.failure.json b/test/fixtures/invalid-syntax/migrated_0244.failure.json index 26ec5f98f..5407b6e54 100644 --- a/test/fixtures/invalid-syntax/migrated_0244.failure.json +++ b/test/fixtures/invalid-syntax/migrated_0244.failure.json @@ -1,6 +1 @@ -{ - "index": 15, - "lineNumber": 1, - "column": 16, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file +{"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"} \ No newline at end of file diff --git a/test/fixtures/invalid-syntax/migrated_0245.failure.json b/test/fixtures/invalid-syntax/migrated_0245.failure.json index 0133e9703..c4552cb3f 100644 --- a/test/fixtures/invalid-syntax/migrated_0245.failure.json +++ b/test/fixtures/invalid-syntax/migrated_0245.failure.json @@ -1,6 +1 @@ -{ - "index": 44, - "lineNumber": 1, - "column": 45, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file +{"index":46,"lineNumber":1,"column":47,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} \ No newline at end of file diff --git a/test/fixtures/invalid-syntax/migrated_0249.failure.json b/test/fixtures/invalid-syntax/migrated_0249.failure.json index dfe0345e6..c4552cb3f 100644 --- a/test/fixtures/invalid-syntax/migrated_0249.failure.json +++ b/test/fixtures/invalid-syntax/migrated_0249.failure.json @@ -1,6 +1 @@ -{ - "index": 36, - "lineNumber": 1, - "column": 37, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" -} \ No newline at end of file +{"index":46,"lineNumber":1,"column":47,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} \ No newline at end of file diff --git a/test/fixtures/tolerant-parse/migrated_0035.failure.json b/test/fixtures/tolerant-parse/migrated_0035.failure.json new file mode 100644 index 000000000..523a428f4 --- /dev/null +++ b/test/fixtures/tolerant-parse/migrated_0035.failure.json @@ -0,0 +1 @@ +{"index":35,"lineNumber":1,"column":36,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} \ No newline at end of file diff --git a/test/fixtures/tolerant-parse/migrated_0035.tree.json b/test/fixtures/tolerant-parse/migrated_0035.tree.json deleted file mode 100644 index 703e43a6f..000000000 --- a/test/fixtures/tolerant-parse/migrated_0035.tree.json +++ /dev/null @@ -1,394 +0,0 @@ -{ - "type": "Program", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "Literal", - "value": "use strict", - "raw": "\"use strict\"", - "range": [ - 0, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "directive": "use strict", - "range": [ - 0, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": "FunctionDeclaration", - "id": { - "type": "Identifier", - "name": "f", - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - { - "type": "Identifier", - "name": "foo", - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 31 - }, - "end": { - "line": 1, - "column": 34 - } - } - } - ], - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 36, - 38 - ], - "loc": { - "start": { - "line": 1, - "column": 36 - }, - "end": { - "line": 1, - "column": 38 - } - } - }, - "generator": false, - "expression": false, - "async": false, - "range": [ - 14, - 38 - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 38 - } - } - }, - { - "type": "EmptyStatement", - "range": [ - 38, - 39 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 39 - } - } - } - ], - "sourceType": "script", - "tokens": [ - { - "type": "String", - "value": "\"use strict\"", - "range": [ - 0, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - { - "type": "Punctuator", - "value": ";", - "range": [ - 12, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": "Keyword", - "value": "function", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - { - "type": "Identifier", - "value": "f", - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 24, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - { - "type": "Identifier", - "value": "foo", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - { - "type": "Punctuator", - "value": ",", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - { - "type": "Identifier", - "value": "foo", - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 31 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 1, - "column": 34 - }, - "end": { - "line": 1, - "column": 35 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 36, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 36 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 37, - 38 - ], - "loc": { - "start": { - "line": 1, - "column": 37 - }, - "end": { - "line": 1, - "column": 38 - } - } - }, - { - "type": "Punctuator", - "value": ";", - "range": [ - 38, - 39 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 39 - } - } - } - ], - "errors": [ - { - "index": 31, - "lineNumber": 1, - "column": 32, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" - } - ], - "range": [ - 0, - 39 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 39 - } - } -} diff --git a/test/fixtures/tolerant-parse/migrated_0038.failure.json b/test/fixtures/tolerant-parse/migrated_0038.failure.json new file mode 100644 index 000000000..9cef7715b --- /dev/null +++ b/test/fixtures/tolerant-parse/migrated_0038.failure.json @@ -0,0 +1 @@ +{"index":36,"lineNumber":1,"column":37,"message":"Error: Line 1: Duplicate parameter name not allowed in this context","description":"Duplicate parameter name not allowed in this context"} \ No newline at end of file diff --git a/test/fixtures/tolerant-parse/migrated_0038.tree.json b/test/fixtures/tolerant-parse/migrated_0038.tree.json deleted file mode 100644 index 77c539a73..000000000 --- a/test/fixtures/tolerant-parse/migrated_0038.tree.json +++ /dev/null @@ -1,430 +0,0 @@ -{ - "type": "Program", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "Literal", - "value": "use strict", - "raw": "\"use strict\"", - "range": [ - 0, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "directive": "use strict", - "range": [ - 0, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "FunctionExpression", - "id": { - "type": "Identifier", - "name": "f", - "range": [ - 24, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - { - "type": "Identifier", - "name": "foo", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 35 - } - } - } - ], - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 37, - 39 - ], - "loc": { - "start": { - "line": 1, - "column": 37 - }, - "end": { - "line": 1, - "column": 39 - } - } - }, - "generator": false, - "expression": false, - "async": false, - "range": [ - 15, - 39 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 39 - } - } - }, - "range": [ - 14, - 41 - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 41 - } - } - } - ], - "sourceType": "script", - "tokens": [ - { - "type": "String", - "value": "\"use strict\"", - "range": [ - 0, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - { - "type": "Punctuator", - "value": ";", - "range": [ - 12, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - { - "type": "Keyword", - "value": "function", - "range": [ - 15, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - { - "type": "Identifier", - "value": "f", - "range": [ - 24, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - { - "type": "Punctuator", - "value": "(", - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - { - "type": "Identifier", - "value": "foo", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - { - "type": "Punctuator", - "value": ",", - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - { - "type": "Identifier", - "value": "foo", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 35 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - { - "type": "Punctuator", - "value": "{", - "range": [ - 37, - 38 - ], - "loc": { - "start": { - "line": 1, - "column": 37 - }, - "end": { - "line": 1, - "column": 38 - } - } - }, - { - "type": "Punctuator", - "value": "}", - "range": [ - 38, - 39 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 39 - } - } - }, - { - "type": "Punctuator", - "value": ")", - "range": [ - 39, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 39 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - { - "type": "Punctuator", - "value": ";", - "range": [ - 40, - 41 - ], - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 41 - } - } - } - ], - "errors": [ - { - "index": 32, - "lineNumber": 1, - "column": 33, - "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" - } - ], - "range": [ - 0, - 41 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 41 - } - } -} diff --git a/test/test-262-whitelist.txt b/test/test-262-whitelist.txt index 7444a25e9..e7032542e 100644 --- a/test/test-262-whitelist.txt +++ b/test/test-262-whitelist.txt @@ -10740,7 +10740,6 @@ test/language/expressions/async-generator/early-errors-expression-not-simple-ass test/language/expressions/async-generator/early-errors-expression-not-simple-assignment-target.js(strict mode) test/language/expressions/async-generator/escaped-async.js(default) test/language/expressions/async-generator/escaped-async.js(strict mode) -test/language/expressions/function/dflt-params-duplicates.js(default) test/language/expressions/function/early-body-super-prop.js(default) test/language/expressions/function/early-body-super-prop.js(strict mode) test/language/expressions/generators/param-dflt-yield.js(default) @@ -10810,7 +10809,6 @@ test/language/literals/regexp/u-unicode-esc-non-hex.js(strict mode) test/language/literals/regexp/unicode-escape-nls-err.js(default) test/language/literals/regexp/unicode-escape-nls-err.js(strict mode) test/language/literals/string/legacy-non-octal-escape-sequence-strict.js(strict mode) -test/language/statements/async-function/dflt-params-duplicates.js(default) test/language/statements/async-function/early-errors-declaration-body-contains-super-property.js(default) test/language/statements/async-function/early-errors-declaration-body-contains-super-property.js(strict mode) test/language/statements/async-function/early-errors-declaration-formals-body-duplicate.js(default) @@ -10864,7 +10862,6 @@ test/language/statements/for-of/labelled-fn-stmt-let.js(default) test/language/statements/for-of/labelled-fn-stmt-var.js(default) test/language/statements/for-of/labelled-fn-stmt-lhs.js(default) test/language/statements/for-of/let-array-with-newline.js(default) -test/language/statements/function/dflt-params-duplicates.js(default) test/language/statements/function/early-body-super-prop.js(default) test/language/statements/function/early-body-super-prop.js(strict mode) test/language/statements/generators/param-dflt-yield.js(default) @@ -11148,14 +11145,12 @@ test/language/expressions/object/method-definition/escaped-set-t.js(default) test/language/expressions/object/method-definition/escaped-set-t.js(strict mode) test/language/expressions/object/method-definition/escaped-set.js(default) test/language/expressions/object/method-definition/escaped-set.js(strict mode) -test/language/expressions/object/method-definition/gen-meth-dflt-params-duplicates.js(default) test/language/expressions/object/method-definition/generator-param-id-yield.js(default) test/language/expressions/object/method-definition/generator-param-redecl-const.js(default) test/language/expressions/object/method-definition/generator-param-redecl-const.js(strict mode) test/language/expressions/object/method-definition/generator-param-init-yield.js(default) test/language/expressions/object/method-definition/generator-param-redecl-let.js(default) test/language/expressions/object/method-definition/generator-param-redecl-let.js(strict mode) -test/language/expressions/object/method-definition/meth-dflt-params-duplicates.js(default) test/language/expressions/object/method-definition/name-param-redecl.js(default) test/language/expressions/object/method-definition/name-param-redecl.js(strict mode) test/language/expressions/object/method-definition/yield-as-parameter.js(default)