diff options
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/generics.txt | 6 | ||||
-rw-r--r-- | doc/manual/stmts.txt | 4 | ||||
-rw-r--r-- | doc/manual/types.txt | 3 |
3 files changed, 7 insertions, 6 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 diff --git a/doc/manual/stmts.txt b/doc/manual/stmts.txt index 5668b8cc2..3a86a9730 100644 --- a/doc/manual/stmts.txt +++ b/doc/manual/stmts.txt @@ -547,9 +547,6 @@ Instead of: Using statement --------------- -**Warning**: The ``using`` statement is experimental and has to be -explicitly enabled with the `experimental`:idx: pragma or command line option! - The using statement provides syntactic convenience in modules where the same parameter names and types are used over and over. Instead of: @@ -563,7 +560,6 @@ name ``c`` should default to type ``Context``, ``n`` should default to ``Node`` etc.: .. code-block:: nim - {.experimental.} using c: Context n: Node diff --git a/doc/manual/types.txt b/doc/manual/types.txt index 927cda9e1..5d2ad01d7 100644 --- a/doc/manual/types.txt +++ b/doc/manual/types.txt @@ -550,8 +550,7 @@ order. The *names* of the fields also have to be identical. The assignment operator for tuples copies each component. The default assignment operator for objects copies each component. Overloading -of the assignment operator for objects is not possible, but this will change -in future versions of the compiler. +of the assignment operator is described in `type-bound-operations-operator`_. .. code-block:: nim |