2019-01-23 17:07:19 +01:00
|
|
|
// Copyright 2019 Mike Pennisi. All rights reserved.
|
2016-01-26 23:31:32 +01:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2019-01-23 17:07:19 +01:00
|
|
|
esid: sec-method-definitions
|
|
|
|
description: Formal parameters may not contain duplicates
|
|
|
|
info: |
|
|
|
|
# 14.3 Method Definitions
|
|
|
|
|
|
|
|
MethodDefinition[Yield, Await]:
|
|
|
|
PropertyName[?Yield, ?Await](UniqueFormalParameters[~Yield, ~Await]){FunctionBody[~Yield, ~Await]}
|
|
|
|
|
|
|
|
# 14.1.2 Static Semantics: Early Errors
|
|
|
|
|
|
|
|
UniqueFormalParameters:FormalParameters
|
|
|
|
|
|
|
|
- It is a Syntax Error if BoundNames of FormalParameters contains any
|
|
|
|
duplicate elements.
|
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
|
2016-01-26 23:31:32 +01:00
|
|
|
---*/
|
2017-04-29 22:31:08 +02:00
|
|
|
|
2018-10-11 16:59:24 +02:00
|
|
|
$DONOTEVALUATE();
|
2017-04-07 17:34:55 +02:00
|
|
|
({
|
2019-01-23 17:07:19 +01:00
|
|
|
foo(a, a) { }
|
2017-04-07 17:34:55 +02:00
|
|
|
})
|