Updated manual
This commit is contained in:
parent
d3220de5bf
commit
19076ee4a1
|
@ -190,7 +190,8 @@ fn identity[T: int | int32](x: T): T {
|
|||
|
||||
This code will, again, fail to compile: this is because as far as peon is concerned, `foo` is not
|
||||
defined for both `int` and `int32` _at the same time_. In order for that to work, `foo` would need
|
||||
to be rewritten with `T: int32 | int` as its generic argument type in order to avoid the ambiguity.
|
||||
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).
|
||||
|
||||
|
||||
#### More generics
|
||||
|
|
Loading…
Reference in New Issue