You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
problemMessage: "Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type' is nullable and '#type2' isn't."
5213
-
analyzerCode: MAP_VALUE_TYPE_NOT_ASSIGNABLE
5214
-
script: >
5215
-
main() {
5216
-
Map<String, int?> a = <String, int?>{"foo": 42, "bar": null};
problemMessage: "Can't assign spread entry values of type '#type' to map entry values of type '#type2' because '#type3' is nullable and '#type4' isn't."
5222
-
analyzerCode: MAP_VALUE_TYPE_NOT_ASSIGNABLE
5223
-
script: >
5224
-
main() {
5225
-
Map<String, List<int?>> a = <String, List<int?>>{"foo": [42], "bar": [null]};
5226
-
Map<String, List<int>> b = <String, List<int>>{...a};
5227
-
}
5228
-
5229
5193
CantDisambiguateNotEnoughInformation:
5230
5194
problemMessage: "Not enough type information to disambiguate between literal set and literal map."
5231
5195
correctionMessage: "Try providing type arguments for the literal explicitly to disambiguate it."
Copy file name to clipboardExpand all lines: pkg/front_end/testcases/nnbd/assignability_error_messages.dart.strong.expect
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,13 @@ library;
24
24
// <A>[...l2]; // Error.
25
25
// ^
26
26
//
27
-
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry keys of type 'B?' to map entry keys of type 'A' because 'B?' is nullable and 'A' isn't.
27
+
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry keys of type 'B?' to map entry keys of type 'A'.
28
28
// - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
29
29
// - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
30
30
// <A, A>{...m}; // Error.
31
31
// ^
32
32
//
33
-
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry values of type 'B?' to map entry values of type 'A' because 'B?' is nullable and 'A' isn't.
33
+
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry values of type 'B?' to map entry values of type 'A'.
34
34
// - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
35
35
// - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
36
36
// <A, A>{...m}; // Error.
@@ -103,14 +103,14 @@ library;
103
103
// <List<A>>[...l]; // Error.
104
104
// ^
105
105
//
106
-
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry keys of type 'List<B?>' to map entry keys of type 'List<A>' because 'B?' is nullable and 'A' isn't.
106
+
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry keys of type 'List<B?>' to map entry keys of type 'List<A>'.
107
107
// - 'List' is from 'dart:core'.
108
108
// - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
109
109
// - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
110
110
// <List<A>, List<A>>{...m}; // Error.
111
111
// ^
112
112
//
113
-
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry values of type 'List<B?>' to map entry values of type 'List<A>' because 'B?' is nullable and 'A' isn't.
113
+
// pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry values of type 'List<B?>' to map entry values of type 'List<A>'.
114
114
// - 'List' is from 'dart:core'.
115
115
// - 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
116
116
// - 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
<self::A>[invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:32:10: Error: An expression whose value can be 'null' must be null-checked before it can be dereferenced.
222
222
<A>[...l2]; // Error.
223
223
^"];
224
-
<self::A, self::A>{invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry keys of type 'B?' to map entry keys of type 'A' because 'B?' is nullable and 'A' isn't.
224
+
<self::A, self::A>{invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry keys of type 'B?' to map entry keys of type 'A'.
225
225
- 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
226
226
- 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
227
227
<A, A>{...m}; // Error.
228
-
^": invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry values of type 'B?' to map entry values of type 'A' because 'B?' is nullable and 'A' isn't.
228
+
^": invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:33:13: Error: Can't assign spread entry values of type 'B?' to map entry values of type 'A'.
229
229
- 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
230
230
- 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
- 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
304
304
<List<A>>[...l]; // Error.
305
305
^"];
306
-
<core::List<self::A>, core::List<self::A>>{invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry keys of type 'List<B?>' to map entry keys of type 'List<A>' because 'B?' is nullable and 'A' isn't.
306
+
<core::List<self::A>, core::List<self::A>>{invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry keys of type 'List<B?>' to map entry keys of type 'List<A>'.
307
307
- 'List' is from 'dart:core'.
308
308
- 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
309
309
- 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
310
310
<List<A>, List<A>>{...m}; // Error.
311
-
^": invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry values of type 'List<B?>' to map entry values of type 'List<A>' because 'B?' is nullable and 'A' isn't.
311
+
^": invalid-expression "pkg/front_end/testcases/nnbd/assignability_error_messages.dart:58:25: Error: Can't assign spread entry values of type 'List<B?>' to map entry values of type 'List<A>'.
312
312
- 'List' is from 'dart:core'.
313
313
- 'B' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
314
314
- 'A' is from 'pkg/front_end/testcases/nnbd/assignability_error_messages.dart'.
0 commit comments