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
/usercode/in.nim(6, 8) template/generic instantiation of `myProc` from here
/playground/nim/lib/pure/collections/sequtils.nim(712, 11) Error: cannot evaluate at compile time: i`gensym3690237
Workaround
import sugar
procmyProc[T](x: T) =const myConst =collect(newSeq, for i in1..3: i)
myProc123
Additional Information
Nim 1.2.0
The text was updated successfully, but these errors were encountered:
@dawkot this has nothing to do with generics, when you state can't be assigned to a const inside a generic proc you really have to check whether it would instead work inside a non-generic.
It turns out it also doesn't work:
Example
Current Output
Workaround
Additional Information
The text was updated successfully, but these errors were encountered: