documentation improvement; make mixin easier to search (#6409)
This commit is contained in:
parent
cc24b6d4cb
commit
dabe4aed86
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue