mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
JS: Add test with destructuring pattern that looks like type annotations
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
| ts-test.ts:3:13:3:13 | x | Repeated binding of pattern variable 'x' previously bound $@. | ts-test.ts:3:10:3:10 | x | here |
|
||||
| ts-test.ts:8:16:8:16 | x | Repeated binding of pattern variable 'x' previously bound $@. | ts-test.ts:8:10:8:10 | x | here |
|
||||
| ts-test.ts:11:10:11:10 | x | Repeated binding of pattern variable 'x' previously bound $@. | ts-test.ts:11:7:11:7 | x | here |
|
||||
| ts-test.ts:21:8:21:13 | string | Repeated binding of pattern variable 'string' previously bound $@. | ts-test.ts:20:8:20:13 | string | here |
|
||||
| tst.js:3:13:3:13 | x | Repeated binding of pattern variable 'x' previously bound $@. | tst.js:3:10:3:10 | x | here |
|
||||
| tst.js:8:16:8:16 | x | Repeated binding of pattern variable 'x' previously bound $@. | tst.js:8:10:8:10 | x | here |
|
||||
| tst.js:11:10:11:10 | x | Repeated binding of pattern variable 'x' previously bound $@. | tst.js:11:7:11:7 | x | here |
|
||||
|
||||
@@ -15,3 +15,12 @@ var { x: x, x: y } = o;
|
||||
|
||||
// OK
|
||||
var { p = x, q = x } = o;
|
||||
|
||||
function f({
|
||||
x: string,
|
||||
y: string // NOT OK
|
||||
}) {
|
||||
}
|
||||
|
||||
function g({x, y}: {x: string, y: string}) { // OK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user