multi-methods need to be explicitly enabled (#10856)

* multi-methods need to be explicitly enabled

* update changelog, manual and tutorial
This commit is contained in:
Miran 2019-03-18 08:21:38 +01:00 • committed by Andreas Rumpf
commit afeca3d9fe
8 changed files with 36 additions and 7 deletions

View file

@ -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: