summary refs log tree commit diff stats
path: root/doc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-05-24 18:33:53 +0200
committerGitHub <noreply@github.com>2019-05-24 18:33:53 +0200
commitef8ddef47b6ea10c6e5e504165245ab514391056 (patch)
treeaa1d68dfd81bef608f033af9b25daba96e97e613 /doc
parentd67a9f024eeeb2bc26fb38a98be9a53956003290 (diff)
downloadNim-ef8ddef47b6ea10c6e5e504165245ab514391056.tar.gz
fixes #10912 (#11317)
* fixes #10912

* update the tutorial examples
Diffstat (limited to 'doc')
-rw-r--r--doc/tut2.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/tut2.rst b/doc/tut2.rst
index fda953eda..44b76f5ac 100644
--- a/doc/tut2.rst
+++ b/doc/tut2.rst
@@ -277,7 +277,7 @@ Procedures always use static dispatch. For dynamic dispatch replace the
       a, b: Expression
 
   # watch out: 'eval' relies on dynamic binding
-  method eval(e: Expression): int =
+  method eval(e: Expression): int {.base.} =
     # override this base method
     quit "to override!"
 
@@ -300,7 +300,7 @@ In a multi-method all parameters that have an object type are used for the
 dispatching:
 
 .. code-block:: nim
-    :test: "nim c $1"
+    :test: "nim c --multiMethods:on $1"
 
   type
     Thing = ref object of RootObj
@@ -611,7 +611,7 @@ To pass a block of statements to a template, use 'untyped' for the last paramete
     :test: "nim c $1"
 
   template withFile(f: untyped, filename: string, mode: FileMode,
-                    body: untyped): typed =
+                    body: untyped) =
     let fn = filename
     var f: File
     if open(f, fn, mode):