diff options
author | narimiran <narimiran@disroot.org> | 2018-11-18 12:53:21 +0100 |
---|---|---|
committer | narimiran <narimiran@disroot.org> | 2018-11-18 12:53:21 +0100 |
commit | 696dc1609fd6eabfbce9ace81908ff4424c52e8c (patch) | |
tree | 76c95f7621bd685dfe2af0d505612328ab8e9a5c /doc/manual.rst | |
parent | e2f32deba3fbaee4634135b209893cd16e595c39 (diff) | |
download | Nim-696dc1609fd6eabfbce9ace81908ff4424c52e8c.tar.gz |
fix manual entry for .this pragma [ci skip]
Diffstat (limited to 'doc/manual.rst')
-rw-r--r-- | doc/manual.rst | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index cb0194ba4..b39711dfb 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -2383,7 +2383,8 @@ Automatic self insertions Starting with version 0.14 of the language, Nim supports ``field`` as a shortcut for ``self.field`` comparable to the `this`:idx: keyword in Java or C++. This feature has to be explicitly enabled via a ``{.this: self.}`` -statement pragma. This pragma is active for the rest of the module: +statement pragma (instead of ``self`` any other identifier can be used too). +This pragma is active for the rest of the module: .. code-block:: nim type @@ -2398,10 +2399,6 @@ statement pragma. This pragma is active for the rest of the module: # is rewritten to: # result = self.parentField + self.childField -Instead of ``self`` any other identifier can be used too, but -``{.this: self.}`` will become the default directive for the whole language -eventually. - In addition to fields, routine applications are also rewritten, but only if no other interpretation of the call is possible: |