@@ -4,7 +4,7 @@ Author: Bob Nystrom
4
4
5
5
Status: In progress
6
6
7
- Version 1.1 (see [ CHANGELOG] ( #CHANGELOG ) at end)
7
+ Version 1.2 (see [ CHANGELOG] ( #CHANGELOG ) at end)
8
8
9
9
## Motivation
10
10
@@ -79,17 +79,10 @@ These primitive types are added to `dart:core`:
79
79
80
80
### The ` Record ` class
81
81
82
- A built-in class whose signature is:
83
-
84
- ``` dart
85
- abstract class Record {
86
- static Iterable<Object?> positionalFields(Record record);
87
- static Map<Symbol, Object?> namedFields(Record record);
88
- }
89
- ```
90
-
82
+ A built-in class ` Record ` with no members except those inherited from ` Object ` .
91
83
This type cannot be constructed, extended, mixed in, or implemented by
92
- user-defined classes.
84
+ user-defined classes. * It's similar to how the ` Function ` class is the
85
+ superclass for function types.*
93
86
94
87
### The ` Destructure<n> ` types
95
88
@@ -229,7 +222,7 @@ handle function typedefs.)
229
222
230
223
### Members
231
224
232
- A record type declares all of the members defined on Object. It also exposes
225
+ A record type declares all of the members defined on ` Object ` . It also exposes
233
226
getters for each named field where the name of the getter is the field's name
234
227
and the getter's type is the field's type.
235
228
@@ -255,9 +248,9 @@ The class `Record` is a subtype of `Object` and `dynamic` and a supertype of
255
248
256
249
A record type ` A ` is a subtype of record type ` B ` iff they have same shape and
257
250
the types of all fields of ` A ` are subtypes of the corresponding field types of
258
- ` B ` . In type system lingo, this means record types are "covariant" or have
251
+ ` B ` . * In type system lingo, this means record types are "covariant" or have
259
252
"depth subtyping". Record types with different shapes are not subtypes. There is
260
- no "row polymorphism" or "width subtyping".
253
+ no "row polymorphism" or "width subtyping".*
261
254
262
255
If a record type has positional fields, then it is a subtype of the
263
256
` Destructure ` interface with the same number of fields and with type arguments
@@ -411,6 +404,10 @@ covariant in their field types.
411
404
412
405
## CHANGELOG
413
406
407
+ ### 1.2
408
+
409
+ - Remove the static methods on ` Record ` (#2127 ).
410
+
414
411
### 1.1
415
412
416
413
- Minor copy editing and clean up.
0 commit comments