File: declarationEmitDestructuring2.errors.txt

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (25 lines) | stat: -rw-r--r-- 1,469 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
tests/cases/compiler/declarationEmitDestructuring2.ts(3,13): error TS2300: Duplicate identifier 'a'.
tests/cases/compiler/declarationEmitDestructuring2.ts(3,17): error TS2300: Duplicate identifier 'b'.
tests/cases/compiler/declarationEmitDestructuring2.ts(3,23): error TS2300: Duplicate identifier 'c'.
tests/cases/compiler/declarationEmitDestructuring2.ts(3,41): error TS2300: Duplicate identifier 'a'.
tests/cases/compiler/declarationEmitDestructuring2.ts(3,44): error TS2300: Duplicate identifier 'b'.
tests/cases/compiler/declarationEmitDestructuring2.ts(3,47): error TS2300: Duplicate identifier 'c'.


==== tests/cases/compiler/declarationEmitDestructuring2.ts (6 errors) ====
    function f({x = 10, y: [a, b, c, d] = [1, 2, 3, 4]} = { x: 10, y: [2, 4, 6, 8] }) { }
    function g([a, b, c, d] = [1, 2, 3, 4]) { }
    function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ }
                ~
!!! error TS2300: Duplicate identifier 'a'.
                    ~
!!! error TS2300: Duplicate identifier 'b'.
                          ~
!!! error TS2300: Duplicate identifier 'c'.
                                            ~
!!! error TS2300: Duplicate identifier 'a'.
                                               ~
!!! error TS2300: Duplicate identifier 'b'.
                                                  ~
!!! error TS2300: Duplicate identifier 'c'.
    function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ }