-
-
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
Regression: 0.18 code with mapIt() fails to compile on 0.19 #9093
Comments
Not much of a regression here, for some reason iterators are preferred to procedures in In the following snippet: type outType = type((
block:
var it{.inject.}: type(items(s));
op)) Where |
I only fixed a typo in in this procedure. Personally I would never use it. echo inp.split(",").mapIt(seq[string], it.split(":")) to get the previous result, or echo inp.split(",").mapIt(string, it.split(":")) to get some kind of flatmap... |
@skilchen what is the Update: Answering to myself: https://nim-lang.org/docs/sequtils.html#mapIt.t,untyped,untyped,untyped. Though, this has been deprecated for a while now. About "flatmap", that's just a string representation of the sea, right? (Would be a pain to parse that I think). This worked when I tried: echo inp.split(",").mapIt($it.split(":")) But the output of that won't be very useful. |
This used to work on 0.18 (output: @[@["a", "b"], @["c", "d"]])
0.19 fails with:
The text was updated successfully, but these errors were encountered: