-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
foldr
raises IndexError when called on sequence
#14404
Comments
woks at proc scope, fails at module and block scope (as of 16003bf 1.3.5) import sequtils
template fun = echo toSeq(1..10).foldr(a + b)
proc main=fun()
main() # works
block: fun() # fails
fun() # fails @refracted always check against latest devel when reporting issues (in this case it does fail in devel, but oftentimes it's a bug that was recently fixed in devel); also make sure example is self contained (i had to add |
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
May 21, 2020
Araq
pushed a commit
that referenced
this issue
May 21, 2020
EchoPouet
pushed a commit
to EchoPouet/Nim
that referenced
this issue
Jun 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example
Current Output
Expected Output
What works
The following all work as expected.
nim version
The text was updated successfully, but these errors were encountered: