Skip to content

Commit 696e6a3

Browse files
author
Yui T
committed
Update test and baseliens from parsing classLikeDeclaration in strict mode
1 parent 64427a9 commit 696e6a3

36 files changed

+923
-1191
lines changed
Lines changed: 100 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,203 @@
11
tests/cases/compiler/collisionArgumentsClassConstructor.ts(3,28): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
2+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(3,31): error TS1100: Invalid use of 'arguments' in strict mode.
3+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(4,13): error TS1100: Invalid use of 'arguments' in strict mode.
4+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(8,17): error TS1100: Invalid use of 'arguments' in strict mode.
25
tests/cases/compiler/collisionArgumentsClassConstructor.ts(8,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
6+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(9,13): error TS1100: Invalid use of 'arguments' in strict mode.
7+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(13,17): error TS1100: Invalid use of 'arguments' in strict mode.
8+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(14,13): error TS1100: Invalid use of 'arguments' in strict mode.
9+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(20,13): error TS1100: Invalid use of 'arguments' in strict mode.
10+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(25,13): error TS1100: Invalid use of 'arguments' in strict mode.
311
tests/cases/compiler/collisionArgumentsClassConstructor.ts(30,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
12+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(30,24): error TS1100: Invalid use of 'arguments' in strict mode.
13+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(31,13): error TS1100: Invalid use of 'arguments' in strict mode.
14+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(35,24): error TS1100: Invalid use of 'arguments' in strict mode.
15+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(36,13): error TS1100: Invalid use of 'arguments' in strict mode.
16+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(41,31): error TS1100: Invalid use of 'arguments' in strict mode.
17+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(44,17): error TS1100: Invalid use of 'arguments' in strict mode.
18+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(47,17): error TS1100: Invalid use of 'arguments' in strict mode.
19+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(51,31): error TS1100: Invalid use of 'arguments' in strict mode.
20+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(52,31): error TS1100: Invalid use of 'arguments' in strict mode.
421
tests/cases/compiler/collisionArgumentsClassConstructor.ts(53,25): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
22+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(53,28): error TS1100: Invalid use of 'arguments' in strict mode.
23+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(54,13): error TS1100: Invalid use of 'arguments' in strict mode.
24+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(59,17): error TS1100: Invalid use of 'arguments' in strict mode.
25+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(60,17): error TS1100: Invalid use of 'arguments' in strict mode.
26+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(61,17): error TS1100: Invalid use of 'arguments' in strict mode.
527
tests/cases/compiler/collisionArgumentsClassConstructor.ts(61,17): error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
28+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(62,13): error TS1100: Invalid use of 'arguments' in strict mode.
29+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(67,17): error TS1100: Invalid use of 'arguments' in strict mode.
30+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(68,17): error TS1100: Invalid use of 'arguments' in strict mode.
31+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(69,17): error TS1100: Invalid use of 'arguments' in strict mode.
32+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(70,13): error TS1100: Invalid use of 'arguments' in strict mode.
33+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(75,31): error TS1100: Invalid use of 'arguments' in strict mode.
34+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(76,31): error TS1100: Invalid use of 'arguments' in strict mode.
35+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(79,17): error TS1100: Invalid use of 'arguments' in strict mode.
36+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(80,17): error TS1100: Invalid use of 'arguments' in strict mode.
37+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(84,17): error TS1100: Invalid use of 'arguments' in strict mode.
38+
tests/cases/compiler/collisionArgumentsClassConstructor.ts(85,17): error TS1100: Invalid use of 'arguments' in strict mode.
639

740

8-
==== tests/cases/compiler/collisionArgumentsClassConstructor.ts (5 errors) ====
41+
==== tests/cases/compiler/collisionArgumentsClassConstructor.ts (38 errors) ====
942
// Constructors
1043
class c1 {
1144
constructor(i: number, ...arguments) { // error
1245
~~~~~~~~~~~~
1346
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
47+
~~~~~~~~~
48+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
1449
var arguments: any[]; // no error
50+
~~~~~~~~~
51+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
1552
}
1653
}
1754
class c12 {
1855
constructor(arguments: number, ...rest) { // error
56+
~~~~~~~~~
57+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
1958
~~~~~~~~~~~~~~~~~
2059
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
2160
var arguments = 10; // no error
61+
~~~~~~~~~
62+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
2263
}
2364
}
2465
class c1NoError {
2566
constructor(arguments: number) { // no error
67+
~~~~~~~~~
68+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
2669
var arguments = 10; // no error
70+
~~~~~~~~~
71+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
2772
}
2873
}
2974

3075
class c2 {
3176
constructor(...restParameters) {
3277
var arguments = 10; // no error
78+
~~~~~~~~~
79+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
3380
}
3481
}
3582
class c2NoError {
3683
constructor() {
3784
var arguments = 10; // no error
85+
~~~~~~~~~
86+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
3887
}
3988
}
4089

4190
class c3 {
4291
constructor(public arguments: number, ...restParameters) { //arguments is error
4392
~~~~~~~~~~~~~~~~~~~~~~~~
4493
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
94+
~~~~~~~~~
95+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
4596
var arguments = 10; // no error
97+
~~~~~~~~~
98+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
4699
}
47100
}
48101
class c3NoError {
49102
constructor(public arguments: number) { // no error
103+
~~~~~~~~~
104+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
50105
var arguments = 10; // no error
106+
~~~~~~~~~
107+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
51108
}
52109
}
53110

54111
declare class c4 {
55112
constructor(i: number, ...arguments); // No error - no code gen
113+
~~~~~~~~~
114+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
56115
}
57116
declare class c42 {
58117
constructor(arguments: number, ...rest); // No error - no code gen
118+
~~~~~~~~~
119+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
59120
}
60121
declare class c4NoError {
61122
constructor(arguments: number); // no error
123+
~~~~~~~~~
124+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
62125
}
63126

64127
class c5 {
65128
constructor(i: number, ...arguments); // no codegen no error
129+
~~~~~~~~~
130+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
66131
constructor(i: string, ...arguments); // no codegen no error
132+
~~~~~~~~~
133+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
67134
constructor(i: any, ...arguments) { // error
68135
~~~~~~~~~~~~
69136
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
137+
~~~~~~~~~
138+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
70139
var arguments: any[]; // no error
140+
~~~~~~~~~
141+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
71142
}
72143
}
73144

74145
class c52 {
75146
constructor(arguments: number, ...rest); // no codegen no error
147+
~~~~~~~~~
148+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
76149
constructor(arguments: string, ...rest); // no codegen no error
150+
~~~~~~~~~
151+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
77152
constructor(arguments: any, ...rest) { // error
153+
~~~~~~~~~
154+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
78155
~~~~~~~~~~~~~~
79156
!!! error TS2396: Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.
80157
var arguments: any; // no error
158+
~~~~~~~~~
159+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
81160
}
82161
}
83162

84163
class c5NoError {
85164
constructor(arguments: number); // no error
165+
~~~~~~~~~
166+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
86167
constructor(arguments: string); // no error
168+
~~~~~~~~~
169+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
87170
constructor(arguments: any) { // no error
171+
~~~~~~~~~
172+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
88173
var arguments: any; // no error
174+
~~~~~~~~~
175+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
89176
}
90177
}
91178

92179
declare class c6 {
93180
constructor(i: number, ...arguments); // no codegen no error
181+
~~~~~~~~~
182+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
94183
constructor(i: string, ...arguments); // no codegen no error
184+
~~~~~~~~~
185+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
95186
}
96187
declare class c62 {
97188
constructor(arguments: number, ...rest); // no codegen no error
189+
~~~~~~~~~
190+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
98191
constructor(arguments: string, ...rest); // no codegen no error
192+
~~~~~~~~~
193+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
99194
}
100195

101196
declare class c6NoError {
102197
constructor(arguments: number); // no error
198+
~~~~~~~~~
199+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
103200
constructor(arguments: string); // no error
201+
~~~~~~~~~
202+
!!! error TS1100: Invalid use of 'arguments' in strict mode.
104203
}

0 commit comments

Comments
 (0)