File: duplicateClassElements.errors.txt

package info (click to toggle)
node-typescript 4.8.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,068 kB
  • sloc: javascript: 1,735,777; makefile: 7; sh: 1
file content (120 lines) | stat: -rw-r--r-- 5,780 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
tests/cases/compiler/duplicateClassElements.ts(3,12): error TS2300: Duplicate identifier 'a'.
tests/cases/compiler/duplicateClassElements.ts(4,12): error TS2393: Duplicate function implementation.
tests/cases/compiler/duplicateClassElements.ts(6,12): error TS2393: Duplicate function implementation.
tests/cases/compiler/duplicateClassElements.ts(8,12): error TS2300: Duplicate identifier 'x'.
tests/cases/compiler/duplicateClassElements.ts(9,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(9,9): error TS2300: Duplicate identifier 'x'.
tests/cases/compiler/duplicateClassElements.ts(12,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(12,9): error TS2300: Duplicate identifier 'x'.
tests/cases/compiler/duplicateClassElements.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(18,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(21,12): error TS2300: Duplicate identifier 'z'.
tests/cases/compiler/duplicateClassElements.ts(23,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(23,9): error TS2300: Duplicate identifier 'z'.
tests/cases/compiler/duplicateClassElements.ts(26,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(26,9): error TS2300: Duplicate identifier 'z'.
tests/cases/compiler/duplicateClassElements.ts(29,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(32,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2300: Duplicate identifier 'x2'.
tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2717: Subsequent property declarations must have the same type.  Property 'x2' must be of type 'number', but here has type 'any'.
tests/cases/compiler/duplicateClassElements.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(36,9): error TS2300: Duplicate identifier 'z2'.
tests/cases/compiler/duplicateClassElements.ts(39,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(39,9): error TS2300: Duplicate identifier 'z2'.
tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate identifier 'z2'.


==== tests/cases/compiler/duplicateClassElements.ts (24 errors) ====
    class a {
        public a;
        public a;
               ~
!!! error TS2300: Duplicate identifier 'a'.
        public b() {
               ~
!!! error TS2393: Duplicate function implementation.
        }
        public b() {
               ~
!!! error TS2393: Duplicate function implementation.
        }
        public x;
               ~
!!! error TS2300: Duplicate identifier 'x'.
        get x() {
            ~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            ~
!!! error TS2300: Duplicate identifier 'x'.
            return 10;
        }
        set x(_x: number) {
            ~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            ~
!!! error TS2300: Duplicate identifier 'x'.
        }
    
        get y() {
            ~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            return "Hello";
        }
        set y(_y: string) {
            ~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
        }
    
        public z() {
               ~
!!! error TS2300: Duplicate identifier 'z'.
        }
        get z() {
            ~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            ~
!!! error TS2300: Duplicate identifier 'z'.
            return "Hello";
        }
        set z(_y: string) {
            ~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            ~
!!! error TS2300: Duplicate identifier 'z'.
        }
    
        get x2() {
            ~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            return 10;
        }
        set x2(_x: number) {
            ~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
        }
        public x2;
               ~~
!!! error TS2300: Duplicate identifier 'x2'.
               ~~
!!! error TS2717: Subsequent property declarations must have the same type.  Property 'x2' must be of type 'number', but here has type 'any'.
!!! related TS6203 tests/cases/compiler/duplicateClassElements.ts:29:9: 'x2' was also declared here.
    
        get z2() {
            ~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            ~~
!!! error TS2300: Duplicate identifier 'z2'.
            return "Hello";
        }
        set z2(_y: string) {
            ~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
            ~~
!!! error TS2300: Duplicate identifier 'z2'.
        }
        public z2() {
               ~~
!!! error TS2300: Duplicate identifier 'z2'.
        }
    
    }