From cc03ea03007499c4345510ff93d8dd1f2c2d133d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Wed, 23 Oct 2019 10:29:12 +0200 Subject: [PATCH] fixes #12453 (#12475) --- doc/manual.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/manual.rst b/doc/manual.rst index e628ad30b46b4..c9a5fb9e3bd0f 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -5100,6 +5100,25 @@ The problem here is that the compiler already decided that ``something()`` as an iterator is not callable in this context before ``toSeq`` gets its chance to convert it into a sequence. +It is also not possible to use fully qualified identifiers with module +symbol in method call syntax. The order in which the dot operator +binds to symbols prohibits this. + +.. code-block:: nim + :test: "nim c $1" + :status: 1 + + import sequtils + + var myItems = @[1,3,3,7] + let N1 = count(myItems, 3) # OK + let N2 = sequtils.count(myItems, 3) # fully qualified, OK + let N3 = myItems.count(3) # OK + let N4 = myItems.sequtils.count(3) # illegal, `myItems.sequtils` can't be resolved + +This means that when for some reason a procedure needs a +disambiguation through the module name, the call needs to be +written in function call syntax. Macros ======