diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-04-15 22:16:00 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-15 22:16:07 +0200 |
commit | c9f14ca9bee012994c1802f02465081844039486 (patch) | |
tree | ad788d7fa20ab141b99827175065abff8b55377f /doc | |
parent | 2f8289919ef9d9bb11fbf4f67d6c55845ba9a9e4 (diff) | |
download | Nim-c9f14ca9bee012994c1802f02465081844039486.tar.gz |
manual: remove the bind-once typedesc weirdness; replaced by how things should be done
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index 51a3c67a4..b114f0a8a 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -5518,12 +5518,12 @@ instantiation type using the param name: var n = Node.new var tree = new(BinaryTree[int]) -When multiple typedesc params are present, they act like a distinct type class -(i.e. they will bind freely to different types). To force a bind-once behavior -one can use a named alias or an explicit `typedesc` generic param: +When multiple typedesc params are present, they will bind freely to different +types. To force a bind-once behavior +one can use an explicit ``typedesc[T]`` generic param: .. code-block:: nim - proc acceptOnlyTypePairs[T: typedesc, U: typedesc](A, B: T; C, D: U) + proc acceptOnlyTypePairs[T, U](A, B: typedesc[T]; C, D: typedesc[U]) Once bound, typedesc params can appear in the rest of the proc signature: |