You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is a macro accept an iterator parameter, it will no compile if there is same name proc with other typed parameter, that's very annoying, toSeq has this problem.
Compile the following code will generate error.
import macros
# comment this proc will make the compiler worksprocp1(x: int) =echo x
macrop1(s: untyped): untyped=quotedo:
for n in `s`:
echo n
iteratorit(): int=yield1; yield2p1(it())
Compiler output:
D:\Work\Nim\dd.nim(14, 6) Error: attempting to call routine: 'it'
found 'dd.it() [declared in D:\Work\Stock\dd.nim(11, 10)]' of kind 'iterator'
The text was updated successfully, but these errors were encountered:
slangmgh
changed the title
Make the iterator parameter overloadable
Make the proc with iterator parameter overloadable
Apr 28, 2020
If there is a macro accept an iterator parameter, it will no compile if there is same name proc with other typed parameter, that's very annoying, toSeq has this problem.
Compile the following code will generate error.
Compiler output:
The text was updated successfully, but these errors were encountered: