|
1 | | -tests/cases/compiler/f2.ts(5,1): error TS2364: Invalid left-hand side of assignment expression. |
2 | | -tests/cases/compiler/f2.ts(6,1): error TS2364: Invalid left-hand side of assignment expression. |
3 | | -tests/cases/compiler/f2.ts(7,1): error TS2364: Invalid left-hand side of assignment expression. |
4 | | -tests/cases/compiler/f2.ts(7,7): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
5 | | -tests/cases/compiler/f2.ts(8,1): error TS2364: Invalid left-hand side of assignment expression. |
6 | | -tests/cases/compiler/f2.ts(10,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
7 | | -tests/cases/compiler/f2.ts(11,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
8 | | -tests/cases/compiler/f2.ts(12,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
9 | | -tests/cases/compiler/f2.ts(13,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
10 | | -tests/cases/compiler/f2.ts(15,1): error TS2364: Invalid left-hand side of assignment expression. |
11 | | -tests/cases/compiler/f2.ts(16,1): error TS2364: Invalid left-hand side of assignment expression. |
12 | | -tests/cases/compiler/f2.ts(17,1): error TS2364: Invalid left-hand side of assignment expression. |
13 | | -tests/cases/compiler/f2.ts(17,8): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
14 | | -tests/cases/compiler/f2.ts(18,1): error TS2364: Invalid left-hand side of assignment expression. |
15 | | -tests/cases/compiler/f2.ts(20,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
16 | | -tests/cases/compiler/f2.ts(21,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
17 | | -tests/cases/compiler/f2.ts(22,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
18 | | -tests/cases/compiler/f2.ts(23,1): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
19 | | -tests/cases/compiler/f2.ts(25,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
20 | | -tests/cases/compiler/f2.ts(26,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
| 1 | +tests/cases/compiler/f2.ts(9,7): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
| 2 | +tests/cases/compiler/f2.ts(19,8): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
21 | 3 | tests/cases/compiler/f2.ts(27,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
22 | | -tests/cases/compiler/f2.ts(28,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
23 | | -tests/cases/compiler/f2.ts(29,6): error TS2406: Invalid left-hand side in 'for...in' statement. |
24 | | -tests/cases/compiler/f2.ts(29,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
25 | | -tests/cases/compiler/f2.ts(30,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
26 | | -tests/cases/compiler/f2.ts(30,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
27 | | -tests/cases/compiler/f2.ts(31,6): error TS2406: Invalid left-hand side in 'for...in' statement. |
28 | | -tests/cases/compiler/f2.ts(32,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
29 | | -tests/cases/compiler/f2.ts(34,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
30 | | -tests/cases/compiler/f2.ts(35,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
| 4 | +tests/cases/compiler/f2.ts(29,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
| 5 | +tests/cases/compiler/f2.ts(31,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
| 6 | +tests/cases/compiler/f2.ts(32,12): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
31 | 7 | tests/cases/compiler/f2.ts(36,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
32 | | -tests/cases/compiler/f2.ts(37,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
33 | | -tests/cases/compiler/f2.ts(38,6): error TS2406: Invalid left-hand side in 'for...in' statement. |
34 | | -tests/cases/compiler/f2.ts(38,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
35 | | -tests/cases/compiler/f2.ts(39,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
36 | | -tests/cases/compiler/f2.ts(39,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
37 | | -tests/cases/compiler/f2.ts(40,6): error TS2406: Invalid left-hand side in 'for...in' statement. |
38 | | -tests/cases/compiler/f2.ts(41,6): error TS2487: Invalid left-hand side in 'for...of' statement. |
| 8 | +tests/cases/compiler/f2.ts(38,6): error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
| 9 | +tests/cases/compiler/f2.ts(40,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
| 10 | +tests/cases/compiler/f2.ts(41,13): error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
39 | 11 |
|
40 | 12 |
|
41 | 13 | ==== tests/cases/compiler/f1.ts (0 errors) ==== |
42 | 14 | export var x = 1; |
43 | 15 |
|
44 | | -==== tests/cases/compiler/f2.ts (38 errors) ==== |
| 16 | +==== tests/cases/compiler/f2.ts (10 errors) ==== |
| 17 | + |
| 18 | + // all mutations below are illegal and should be fixed |
45 | 19 | import * as stuff from 'f1'; |
46 | 20 |
|
47 | 21 | var n = 'baz'; |
48 | 22 |
|
49 | 23 | stuff.x = 0; |
50 | | - ~~~~~~~ |
51 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
52 | 24 | stuff['x'] = 1; |
53 | | - ~~~~~~~~~~ |
54 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
55 | 25 | stuff.blah = 2; |
56 | | - ~~~~~~~~~~ |
57 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
58 | 26 | ~~~~ |
59 | 27 | !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
60 | 28 | stuff[n] = 3; |
61 | | - ~~~~~~~~ |
62 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
63 | 29 |
|
64 | 30 | stuff.x++; |
65 | | - ~~~~~~~ |
66 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
67 | 31 | stuff['x']++; |
68 | | - ~~~~~~~~~~ |
69 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
70 | 32 | stuff['blah']++; |
71 | | - ~~~~~~~~~~~~~ |
72 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
73 | 33 | stuff[n]++; |
74 | | - ~~~~~~~~ |
75 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
76 | 34 |
|
77 | 35 | (stuff.x) = 0; |
78 | | - ~~~~~~~~~ |
79 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
80 | 36 | (stuff['x']) = 1; |
81 | | - ~~~~~~~~~~~~ |
82 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
83 | 37 | (stuff.blah) = 2; |
84 | | - ~~~~~~~~~~~~ |
85 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
86 | 38 | ~~~~ |
87 | 39 | !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
88 | 40 | (stuff[n]) = 3; |
89 | | - ~~~~~~~~~~ |
90 | | -!!! error TS2364: Invalid left-hand side of assignment expression. |
91 | 41 |
|
92 | 42 | (stuff.x)++; |
93 | | - ~~~~~~~~~ |
94 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
95 | 43 | (stuff['x'])++; |
96 | | - ~~~~~~~~~~~~ |
97 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
98 | 44 | (stuff['blah'])++; |
99 | | - ~~~~~~~~~~~~~~~ |
100 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
101 | 45 | (stuff[n])++; |
102 | | - ~~~~~~~~~~ |
103 | | -!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer. |
104 | 46 |
|
105 | 47 | for (stuff.x in []) {} |
106 | 48 | ~~~~~~~ |
107 | 49 | !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
108 | 50 | for (stuff.x of []) {} |
109 | | - ~~~~~~~ |
110 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
111 | 51 | for (stuff['x'] in []) {} |
112 | 52 | ~~~~~~~~~~ |
113 | 53 | !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
114 | 54 | for (stuff['x'] of []) {} |
115 | | - ~~~~~~~~~~ |
116 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
117 | 55 | for (stuff.blah in []) {} |
118 | | - ~~~~~~~~~~ |
119 | | -!!! error TS2406: Invalid left-hand side in 'for...in' statement. |
120 | 56 | ~~~~ |
121 | 57 | !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
122 | 58 | for (stuff.blah of []) {} |
123 | | - ~~~~~~~~~~ |
124 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
125 | 59 | ~~~~ |
126 | 60 | !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
127 | 61 | for (stuff[n] in []) {} |
128 | | - ~~~~~~~~ |
129 | | -!!! error TS2406: Invalid left-hand side in 'for...in' statement. |
130 | 62 | for (stuff[n] of []) {} |
131 | | - ~~~~~~~~ |
132 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
133 | 63 |
|
134 | 64 | for ((stuff.x) in []) {} |
135 | 65 | ~~~~~~~~~ |
136 | 66 | !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
137 | 67 | for ((stuff.x) of []) {} |
138 | | - ~~~~~~~~~ |
139 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
140 | 68 | for ((stuff['x']) in []) {} |
141 | 69 | ~~~~~~~~~~~~ |
142 | 70 | !!! error TS2405: The left-hand side of a 'for...in' statement must be of type 'string' or 'any'. |
143 | 71 | for ((stuff['x']) of []) {} |
144 | | - ~~~~~~~~~~~~ |
145 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
146 | 72 | for ((stuff.blah) in []) {} |
147 | | - ~~~~~~~~~~~~ |
148 | | -!!! error TS2406: Invalid left-hand side in 'for...in' statement. |
149 | 73 | ~~~~ |
150 | 74 | !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
151 | 75 | for ((stuff.blah) of []) {} |
152 | | - ~~~~~~~~~~~~ |
153 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
154 | 76 | ~~~~ |
155 | 77 | !!! error TS2339: Property 'blah' does not exist on type 'typeof "tests/cases/compiler/f1"'. |
156 | 78 | for ((stuff[n]) in []) {} |
157 | | - ~~~~~~~~~~ |
158 | | -!!! error TS2406: Invalid left-hand side in 'for...in' statement. |
159 | 79 | for ((stuff[n]) of []) {} |
160 | | - ~~~~~~~~~~ |
161 | | -!!! error TS2487: Invalid left-hand side in 'for...of' statement. |
162 | 80 |
|
163 | 81 |
|
164 | 82 |
|
0 commit comments