Skip to content
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

Regression in sequtils #10433

Closed
dom96 opened this issue Jan 23, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@dom96
Copy link
Member

commented Jan 23, 2019

import sequtils

let
  nums = @[1, 2, 3, 4]
  strings = nums.mapIt(string, $(4 * it))
assert strings == @["4", "8", "12", "16"]

Now results in:

a1.nim(5, 38) Error: undeclared identifier: 'it'

We have runnable examples for this, so I'm not sure what happened here. Maybe only when importing the module?

@dom96 dom96 added the Regression label Jan 23, 2019

@dom96

This comment has been minimized.

Copy link
Member Author

commented Jan 23, 2019

This is because that variant of mapIt was deprecated. The error message could definitely be much better, hope people have good google chops

@dom96 dom96 closed this Jan 23, 2019

@Araq Araq reopened this Jan 23, 2019

@Araq Araq added Error messages and removed Regression labels Jan 23, 2019

dom96 added a commit to dom96/nim-only-uuid that referenced this issue Jan 23, 2019

@Araq Araq added the Stdlib label Jan 23, 2019

@Araq

This comment has been minimized.

Copy link
Member

commented Jan 23, 2019

@narimiran Give us the old mapIt back but instead of a .deprecated it should have an .error.

yglukhov added a commit to yglukhov/nim-only-uuid that referenced this issue Jan 24, 2019

narimiran added a commit to narimiran/Nim that referenced this issue Jan 24, 2019

@narimiran narimiran referenced this issue Jan 24, 2019

Merged

fix #10433 #10444

@Araq Araq closed this in e75049d Jan 24, 2019

ThomasTJdev added a commit to ThomasTJdev/Nim that referenced this issue Jan 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.