Updated manual

This commit is contained in:
Mattia Giambirtone 2022-12-15 15:33:02 +01:00
parent 398af0f467
commit e4f5c0dd4b
1 changed files with 3 additions and 2 deletions

View File

@ -193,8 +193,9 @@ defined for both `int` and `int32` _at the same time_. In order for that to work
to be rewritten with `T: int32 | int` as its generic argument type in order to avoid the ambiguity
(or `identity` could be rewritten to use automatic types instead, both are viable options). Obviously,
the above snippet would fail to compile if `foo` were not defined for all the types specified in the
type constraint for `identity` as well (this is because, counterintuitively, when matching generics
`int32 | int` does _not_ mean "either of these types", but rather "_both_ of these types at once")
type constraint for `identity` as well (this is because, counterintuitively, when matching a generic
such as `int32 | int` does _not_ mean "either of these types", but rather "_both_ of these types at
once").
#### More generics