summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2019-03-18 08:21:38 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-03-18 08:21:37 +0100
commitafeca3d9feb31326c87543a1cce401ecaab0b24a (patch)
tree0df5f54cf5bf84342085e7e12cbdb77af19db7b1 /doc
parent9e28d52c2ff02d0808f2305c0107691ec3136129 (diff)
downloadNim-afeca3d9feb31326c87543a1cce401ecaab0b24a.tar.gz
multi-methods need to be explicitly enabled (#10856)
* multi-methods need to be explicitly enabled

* update changelog, manual and tutorial
Diffstat (limited to 'doc')
-rw-r--r--doc/advopt.txt5
-rw-r--r--doc/manual.rst5
-rw-r--r--doc/tut2.rst3
3 files changed, 10 insertions, 3 deletions
diff --git a/doc/advopt.txt b/doc/advopt.txt
index 4dd710107..46b9a12a6 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -13,7 +13,7 @@ Advanced commands:
   //genDepend               generate a DOT file containing the
                           module dependency graph
   //dump                    dump all defined conditionals and search paths
-                            see also: --dump.format:json (useful with: ` | jq`)
+                          see also: --dump.format:json (useful with: ` | jq`)
   //check                   checks the project for syntax and semantic
 
 Runtime checks (see -x):
@@ -78,7 +78,8 @@ Advanced options:
   --tlsEmulation:on|off     turn thread local storage emulation on|off
   --taintMode:on|off        turn taint mode on|off
   --implicitStatic:on|off   turn implicit compile time evaluation on|off
-  --patterns:on|off         turn pattern matching on|off
+  --patterns:on|off         turn term rewriting macros on|off
+  --multimethods:on|off     turn multi-methods on|off
   --memTracker:on|off       turn memory tracker on|off
   --hotCodeReloading:on|off
                             turn support for hot code reloading on|off
diff --git a/doc/manual.rst b/doc/manual.rst
index 09daf4a95..7ed7900e9 100644
--- a/doc/manual.rst
+++ b/doc/manual.rst
@@ -3716,6 +3716,9 @@ The ``[]`` subscript operator for arrays/openarrays/sequences can be overloaded.
 Multi-methods
 =============
 
+**Note:** Starting from Nim 0.20, to use multi-methods one must explicitly pass
+``--multimethods:on`` when compiling.
+
 Procedures always use static dispatch. Multi-methods use dynamic
 dispatch. For dynamic dispatch to work on an object it should be a reference
 type as well.
@@ -6222,7 +6225,7 @@ Predicate                Meaning
 ===================      =====================================================
 
 Predicates that share their name with a keyword have to be escaped with
-backticks: `` `const` ``.
+backticks.
 The ``alias`` and ``noalias`` predicates refer not only to the matching AST,
 but also to every other bound parameter; syntactically they need to occur after
 the ordinary AST predicates:
diff --git a/doc/tut2.rst b/doc/tut2.rst
index 4c1ec5747..5856b9fde 100644
--- a/doc/tut2.rst
+++ b/doc/tut2.rst
@@ -308,6 +308,9 @@ Note that in the example the constructors ``newLit`` and ``newPlus`` are procs
 because it makes more sense for them to use static binding, but ``eval`` is a
 method because it requires dynamic binding.
 
+**Note:** Starting from Nim 0.20, to use multi-methods one must explicitly pass
+``--multimethods:on`` when compiling.
+
 In a multi-method all parameters that have an object type are used for the
 dispatching: