documented new .this pragma

This commit is contained in:
Andreas Rumpf 2016-06-06 19:49:32 +02:00
commit c863ea00ac
4 changed files with 57 additions and 14 deletions

View file

@ -55,7 +55,7 @@ destructor pragma
-----------------
The ``destructor`` pragma is used to mark a proc to act as a type destructor.
Its usage is deprecated, See `type bound operations`_ instead.
Its usage is deprecated, see `type bound operations`_ instead.
override pragma
---------------
@ -518,11 +518,16 @@ Example:
.. code-block:: nim
{.experimental.}
type
FooId = distinct int
BarId = distinct int
using
foo: FooId
bar: BarId
proc useUsing(dest: var string) =
using dest
add "foo"
add "bar"
proc useUsing(bar, foo) =
echo "bar is of type BarId"
echo "foo is of type FooId"
Implementation Specific Pragmas