Skip to content

Commit 712e35f

Browse files
author
Dart CI
committed
Version 2.11.0-205.0.dev
Merge commit '4d1e0378c905bc8cd276f677c7ba80f4f7e3ee1c' into 'dev'
2 parents 1e7250f + 4d1e037 commit 712e35f

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

tests/language/operator/number_operator_error_test.dart

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -34,174 +34,174 @@ void
3434
// [cfe] A value of type 'String' can't be assigned to a variable of type 'num'.
3535

3636
i += d;
37+
//^
38+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'int'.
3739
// ^
3840
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
39-
//^^
40-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'int'.
4141

4242
i += n;
43+
//^
44+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
4345
// ^
4446
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
45-
//^^
46-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
4747

4848
i += never;
49+
//^
50+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
4951
// ^^^^^
5052
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
51-
//^^
52-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
5353

5454
i += dyn; // type of `i + dyn` is `num`, not assignable to `int`.
55+
//^
56+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
5557
// ^^^
5658
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
57-
//^^
58-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'int'.
5959

6060
ti += i; // Type of expression is `int`, not `I`.
61+
// ^
62+
// [cfe] A value of type 'int' can't be assigned to a variable of type 'I'.
6163
// ^
6264
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
63-
// ^^
64-
// [cfe] A value of type 'int' can't be assigned to a variable of type 'I'.
6565

6666
ti += d; // Type of expression is `num`, not `I`.
67+
// ^
68+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'I'.
6769
// ^
6870
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
69-
// ^^
70-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'I'.
7171

7272
ti += n; // Type of expression is `num`, not `I`.
73+
// ^
74+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
7375
// ^
7476
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
75-
// ^^
76-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
7777

7878
ti += never; // Type of expression is `num`, not `I`.
79+
// ^
80+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
7981
// ^^^^^
8082
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
81-
// ^^
82-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
8383

8484
ti += dyn; // type of `i + dyn` is `num`, not assignable to `int`.
85+
// ^
86+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
8587
// ^^^
8688
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
87-
// ^^
88-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'I'.
8989

9090
td += i; // Type of expression is `double`, not `D`.
91+
// ^
92+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
9193
// ^
9294
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
93-
// ^^
94-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
9595

9696
td += d; // Type of expression is `double`, not `D`.
97+
// ^
98+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
9799
// ^
98100
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
99-
// ^^
100-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
101101

102102
td += n; // Type of expression is `double`, not `D`.
103+
// ^
104+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
103105
// ^
104106
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
105-
// ^^
106-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
107107

108108
td += dyn; // Type of expression is `double`, not `D`.
109+
// ^
110+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
109111
// ^^^
110112
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
111-
// ^^
112-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
113113

114114
td += never; // Type of expression is `double`, not `D`.
115+
// ^
116+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
115117
// ^^^^^
116118
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
117-
// ^^
118-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
119119

120120
tn += i; // Type of expression is `num`, not `N`.
121+
// ^
122+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
121123
// ^
122124
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
123-
// ^^
124-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
125125

126126
tn += d; // Type of expression is `num`, not `N`.
127+
// ^
128+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'N'.
127129
// ^
128130
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
129-
// ^^
130-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
131131

132132
tn += n; // Type of expression is `num`, not `N`.
133+
// ^
134+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
133135
// ^
134136
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
135-
// ^^
136-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
137137

138138
tn += dyn; // Type of expression is `num`, not `N`.
139+
// ^
140+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
139141
// ^^^
140142
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
141-
// ^^
142-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
143143

144144
tn += never; // Type of expression is `num`, not `N`.
145+
// ^
146+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
145147
// ^^^^^
146148
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
147-
// ^^
148-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
149149

150150
O oi1 = to; // New variable to avoid demoting `oi`.
151151
if (oi1 is int) {
152152
// Promote oi1 to O&int
153153
oi1 + d; // Valid
154154
oi1 += d;
155+
// ^
156+
// [cfe] A value of type 'double' can't be assigned to a variable of type 'O'.
155157
// ^
156158
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
157-
// ^^
158-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'O'.
159159
}
160160

161161
O oi2 = to;
162162
if (oi2 is int) {
163163
// Promote oi2 to O&int.
164164
oi2 + n; // Valid
165165
oi2 += n;
166+
// ^
167+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
166168
// ^
167169
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
168-
// ^^
169-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
170170
}
171171

172172
O oi3 = to;
173173
if (oi3 is int) {
174174
// Promote oi3 to O&int.
175175
oi3 + dyn; // Valid
176176
oi3 += dyn;
177+
// ^
178+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
177179
// ^^^
178180
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
179-
// ^^
180-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
181181
}
182182

183183
O oi4 = to;
184184
if (oi4 is int) {
185185
// Promote oi4 to O&int.
186186
oi4 + never; // Valid.
187187
oi4 += never;
188+
// ^
189+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
188190
// ^^^^^
189191
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
190-
// ^^
191-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
192192
}
193193

194194
context<D>(i + td); // Type of expression is `double`, not `D`.
195195
// ^^^^^^
196196
// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
197197
// ^
198-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
198+
// [cfe] The argument type 'double' can't be assigned to the parameter type 'D'.
199199

200200
context<D>(n + td); // Type of expression is `double`, not `D`.
201201
// ^^^^^^
202202
// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE
203203
// ^
204-
// [cfe] A value of type 'double' can't be assigned to a variable of type 'D'.
204+
// [cfe] The argument type 'double' can't be assigned to the parameter type 'D'.
205205

206206
context<D>(1.0 + td); // Type of expression is `double`, not `D`.
207207
// ^^^^^^^^
@@ -210,35 +210,35 @@ void
210210
// [cfe] The argument type 'double' can't be assigned to the parameter type 'D'.
211211

212212
tn += n; // Type of expression is `num`, not `N`.
213+
// ^
214+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
213215
// ^
214216
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
215-
// ^^
216-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
217217

218218
tn += dyn;
219+
// ^
220+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
219221
// ^^^
220222
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
221-
// ^^
222-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'N'.
223223

224224
O on1 = to;
225225
if (on1 is num) {
226226
// Promote on1 to O&num.
227227
on1 += n; // Type of expression is `num`, not `N` or `O`.
228+
// ^
229+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
228230
// ^
229231
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
230-
// ^^
231-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
232232
}
233233

234234
O on2 = to;
235235
if (on2 is num) {
236236
// Promote on2 to O&num.
237237
on2 += dyn; // Type of expression is `num`, not `N` or `O`.
238+
// ^
239+
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
238240
// ^^^
239241
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
240-
// ^^
241-
// [cfe] A value of type 'num' can't be assigned to a variable of type 'O'.
242242
}
243243
}
244244

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 2
2828
MINOR 11
2929
PATCH 0
30-
PRERELEASE 204
30+
PRERELEASE 205
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)