-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
[EDIT]
code below gives CT error, it should work instead.
#[
Error: attempting to call routine: 'myiter'
found 't18_overload_untyped.myiter()[declared in t18_overload_untyped.nim(7, 9)]' of kind 'iterator'
foo(myiter())
^
]#
# comment this to make code work
template foo(a: int) = echo "ok1"
template foo(a: untyped) = echo "ok2"
iterator myiter(): int=yield 0
foo(myiter())
-
this would fix Exporting a
toSeq
overload messes up iterator visibility RFCs#512 -
unlike what was said in Exporting a
toSeq
overload messes up iterator visibility RFCs#512 I don't see a way to have atoSeq(s: typed)
that works with inline iterators.
See also my PR #8711 to have a universal toSeq: the untyped
case is still needed to allow for inline iterators eg toSeq(keys(myTable))
EDIT note
this could either be fixed by nim-lang/RFCs#60