mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Merge pull request #2589 from esbena/js/ignore-duplicate-params-for-empty-functions
Approved by erik-krogh
This commit is contained in:
@@ -2,7 +2,7 @@ function f(
|
||||
x,
|
||||
x, // NOT OK
|
||||
\u0078 // NOT OK
|
||||
) {}
|
||||
) { return; }
|
||||
|
||||
this.addPropertyListener(prop.name, function(_, _, _, a) {
|
||||
proxy.delegate = a.dao;
|
||||
@@ -12,3 +12,10 @@ this.addPropertyListener(prop.name, function(_, _, _, a) {
|
||||
function f(x, y, x) {
|
||||
'use strict';
|
||||
}
|
||||
|
||||
function f(
|
||||
x,
|
||||
x // OK: empty function
|
||||
) { }
|
||||
|
||||
(a, a) => a + a; // OK: for strict mode functions, duplicate parameter names are a syntax error
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
| arrows.js:1:5:1:5 | Error: Argument name clash | Error: Argument name clash |
|
||||
| tst.js:2:12:2:12 | Error: Unterminated string constant | Error: Unterminated string constant |
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
(a, a) => a + a;
|
||||
Reference in New Issue
Block a user