zero_functional.nim(298, 34) Error: return type 'untyped' is only valid for macros and templates
deem0n opened this issue · comments
Dmitriy Dorofeev commented
I got this on Nim 0.20 on mac os x, just after import zero_functional
Nim Compiler Version 0.20.0 [MacOSX: amd64]
Compiled at 2019-07-08
Copyright (c) 2006-2019 by Andreas Rumpf
active boot switches: -d:release -d:useLinenoise
Michael Schulte commented
@deem0n so I get a lot of warnings with 0.20.xx but no errors. test.nim
is still working.
What branch did you use? Can't be master since line 298 does not contain code
zero-functional/zero_functional.nim
Line 298 in b328e7e
Dmitriy Dorofeev commented
I do nimble install
:
nimble install --verbose zero_functional
Reading official package list
Downloading https://github.com/zero-functional/zero-functional using git
Cloning latest tagged version: v0.2.0
Verifying dependencies for zero_functional@0.2.0
Installing zero_functional@0.2.0
Prompt: zero_functional@0.2.0 already exists. Overwrite? [y/N]
Answer: y
Copying file /tmp/nimble_37612/githubcom_zerofunctionalzerofunctional/zero_functional.nim to /Users/deem0n/.nimble/pkgs/zero_functional-0.2.0/zero_functional.nim
Copying file /tmp/nimble_37612/githubcom_zerofunctionalzerofunctional/zero_functional.nimble to /Users/deem0n/.nimble/pkgs/zero_functional-0.2.0/zero_functional.nimble
Success: zero_functional installed successfully.
So I am using tag v0.2.0
this are lines around 298 from my local ~/.nimble/pkgs/zero_functional-0.2.0/zero_functional.nim
294 proc createCombination*[A,T](it: array[A,T], idx: array[A,int]): Combination[A,T] =
295 result = Combination[A,T](it: it, idx: idx)
296
297 ## iterator over tuples (needed for flatten to work on tuples, e.g. from zipped lists)
298 iterator items*[T: tuple](a:T) : untyped =
299 for i in a.fields:
300 yield i
Michael Schulte commented
OK - should be fixed in version 0.3.0