Updated manual
This commit is contained in:
parent
e4f5c0dd4b
commit
42a7c4d050
|
@ -193,7 +193,7 @@ 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 a generic
|
||||
type constraint for `identity` as well (this is because, counterintuitively, matching a generic constraint
|
||||
such as `int32 | int` does _not_ mean "either of these types", but rather "_both_ of these types at
|
||||
once").
|
||||
|
||||
|
|
Loading…
Reference in New Issue