File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -146,19 +146,19 @@ The translation of named tuples to instances of `NamedTuple` is fixed by the spe
146
146
- All tuple operations also work with named tuples "out of the box".
147
147
- Macro libraries can rely on this expansion.
148
148
149
- ### The FieldsOf Type
149
+ ### The NamedTuple.From Type
150
150
151
151
The ` NamedTuple ` object contains a type definition
152
152
``` scala
153
- type FieldsOf [T ] <: AnyNamedTuple
153
+ type From [T ] <: AnyNamedTuple
154
154
```
155
- ` FieldsOf ` is treated specially by the compiler. When ` FieldsOf ` is applied to
155
+ ` From ` is treated specially by the compiler. When ` NamedTuple.From ` is applied to
156
156
an argument type that is an instance of a case class, the type expands to the named
157
157
tuple consisting of all the fields of that case class. Here, fields means: elements of the first parameter section. For instance, assuming
158
158
``` scala
159
159
case class City (zip : Int , name : String , population : Int )
160
160
```
161
- then ` FieldsOf [City]` is the named tuple
161
+ then ` NamedTuple.From [City]` is the named tuple
162
162
``` scala
163
163
(zip : Int , name : String , population : Int )
164
164
```
You can’t perform that action at this time.
0 commit comments