From 696dc1609fd6eabfbce9ace81908ff4424c52e8c Mon Sep 17 00:00:00 2001 From: narimiran Date: Sun, 18 Nov 2018 12:53:21 +0100 Subject: [PATCH] fix manual entry for .this pragma [ci skip] --- doc/manual.rst | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/manual.rst b/doc/manual.rst index cb0194ba46..b39711dfb0 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: