diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-09-23 20:07:30 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-09-23 20:07:30 +0200 |
commit | 2e93bac227bf266e710bf4966a0f93461033583a (patch) | |
tree | de66484cd53a0b468bb6cec12de8286a32498d8b /doc/manual | |
parent | 7aad0d6544b14896cc83971aa0cdd6b5f96958ef (diff) | |
parent | 240953411e4a170fd0d17279bc560dda1d0a960a (diff) | |
download | Nim-2e93bac227bf266e710bf4966a0f93461033583a.tar.gz |
Merge branch 'devel' into araq-better-codegen
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/generics.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/manual/generics.txt b/doc/manual/generics.txt index 87fcb7828..cceea33c0 100644 --- a/doc/manual/generics.txt +++ b/doc/manual/generics.txt @@ -633,6 +633,9 @@ the ``vtptr`` magic produced types bound to ``ptr`` types. Symbol lookup in generics ------------------------- +Open and Closed symbols +~~~~~~~~~~~~~~~~~~~~~~~ + The symbol binding rules in generics are slightly subtle: There are "open" and "closed" symbols. A "closed" symbol cannot be re-bound in the instantiation context, an "open" symbol can. Per default overloaded symbols are open @@ -658,6 +661,9 @@ the ``Index`` type is defined *after* the ``==`` for tuples; yet the example compiles as the instantiation takes the currently defined symbols into account too. +Mixin statement +--------------- + A symbol can be forced to be open by a `mixin`:idx: declaration: .. code-block:: nim |