Skip to content

Commit 15a5db7

Browse files
authored
Fix typos.
1 parent 36a2a98 commit 15a5db7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

accepted/future-releases/set-literals/feature-specification.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ since the new syntax is either not allowed by the existing grammar, or it is rej
293293
context expression runtime type and const-ness
294294
*/
295295
var v1 = {}; // LinkedHashMap<dynamic, dynamic>
296-
var v2 = <int, int>{}; // LinkedMap<int, int>
296+
var v2 = <int, int>{}; // LinkedHashMap<int, int>
297297
var v3 = <int>{}; // LinkedHashSet<int>
298298
var v4 = {1: 1}; // LinkedHashMap<int, int>
299299
var v5 = {1}; // LinkedHashSet<int>
@@ -307,19 +307,19 @@ LinkedHashSet<int> v11 = {}; // LinkedHashSet<int>
307307
308308
const v12 = {}; // const Map<dynamic, dynamic>
309309
const v13 = {1}; // const Set<int>
310-
const Set v14 = {} // const Set<dynamic>
311-
Set v15 = const {4} // const Set<dynamic>
310+
const Set v14 = {}; // const Set<dynamic>
311+
Set v15 = const {4}; // const Set<dynamic>
312312
313313
// Compile-time error, overrides `==`.
314314
// const _ = {Duration(seconds: 1)};
315315
// const _ = {2.3};
316316
317317
var v16 = {1, 2, 3, 2, 1}; // LinkedHashSet<int>
318-
var l16 = x.toList(); // -> <int>[1, 2, 3]
318+
var l16 = v16.toList(); // -> <int>[1, 2, 3]
319319
// Compile-time error, contains equal elements
320320
// const _ = {1, 2, 3, 2, 1};
321321
322-
var l18 = const {1, 2} // const Set<int>
322+
var l18 = const {1, 2}; // const Set<int>
323323
324324
// Class overriding `==`.
325325
class C {
@@ -332,17 +332,17 @@ class C {
332332
}
333333
334334
// First equal object wins.
335-
var v19 = {C(1, "a"), C(2, "a"), C("1", b")}; // LinkedHashSet<C>
335+
var v19 = {C(1, "a"), C(2, "a"), C(1, b")}; // LinkedHashSet<C>
336336
print(v19); // {C(1, "a"), C(2, "a")}
337337
338338
const v20 = {1, 2, 3}; // const Set<int>
339339
const v21 = {3, 2, 1}; // const Set<int>
340340
print(identical(v20, v21)); // -> false
341341
342342
// Type can be computed from element types.
343-
var v23 = {1, 2.5} // LinkedHashSet<num>
344-
var v24 = {1, false} // LinkedHashSet<Object>
345-
const v26 = {1, false} // const Set<Object>
343+
var v23 = {1, 2.5}; // LinkedHashSet<num>
344+
var v24 = {1, false}; // LinkedHashSet<Object>
345+
const v26 = {1, false}; // const Set<Object>
346346
```
347347

348348
### With Spreads
@@ -352,8 +352,8 @@ var s2 = {...{1}}; // Set<int>
352352
var s3 = {...{1: 1}}; // Map<int, int>
353353
var s4 = {...{}}; // Map<dynamic, dynamic>
354354
dynamic d = null; // or any value.
355-
var s5 = {...{1}, ...?d} // Set<dynamic>
356-
var s6 = {...{1: 1}, ...?d} // Map<dynamic, dynamic>
355+
var s5 = {...{1}, ...?d}; // Set<dynamic>
356+
var s6 = {...{1: 1}, ...?d}; // Map<dynamic, dynamic>
357357
// var s7 = {...?d}; // Compile-time error, ambiguous
358358
// var s8 = {...{1}, ...{1: 1}}; // Compile-time error, incompatible
359359
```

0 commit comments

Comments
 (0)