fixes #619
This commit is contained in:
parent
9e00d3aec2
commit
f7dca91344
8 changed files with 31 additions and 10 deletions
|
|
@ -225,8 +225,8 @@ a template. ``inject`` and ``gensym`` have no effect in ``dirty`` templates.
|
|||
|
||||
|
||||
|
||||
Limitations of the method invokation syntax
|
||||
-------------------------------------------
|
||||
Limitations of the method call syntax
|
||||
-------------------------------------
|
||||
|
||||
The expression ``x`` in ``x.f`` needs to be semantically checked (that means
|
||||
symbol lookup and type checking) before it can be decided that it needs to be
|
||||
|
|
@ -241,6 +241,21 @@ is used to invoke templates/macros:
|
|||
unknownIdentifier.declareVar
|
||||
|
||||
|
||||
Another common example is this:
|
||||
|
||||
.. code-block:: nim
|
||||
from sequtils import toSeq
|
||||
|
||||
iterator something: string =
|
||||
yield "Hello"
|
||||
yield "World"
|
||||
|
||||
var info = something().toSeq()
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Macros
|
||||
======
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue