We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
=>
There seems to be an issue with future's => and generics:
import sequtils, future proc f*[T](x: T) = let other = @[1, 2, 3] var mapped = toSeq(0 ..< other.len).map(i => (other[i], i)) f(1)
Produces: lib/system.nim(3549, 14) Error: cannot instantiate: 'T'
lib/system.nim(3549, 14) Error: cannot instantiate: 'T'
The issue disappears:
f
i => (i, i)
toSeq(0 ..< other.len).map(proc(i: int): (int, int) = (other[i], i))
The text was updated successfully, but these errors were encountered:
#8679 will fix this
Sorry, something went wrong.
I think I reported this twice because I keep forgetting about the limitations ;).
Closing in favor of #7816
No branches or pull requests
There seems to be an issue with future's
=>
and generics:Produces:
lib/system.nim(3549, 14) Error: cannot instantiate: 'T'
The issue disappears:
f
is not generici => (i, i)
toSeq(0 ..< other.len).map(proc(i: int): (int, int) = (other[i], i))
The text was updated successfully, but these errors were encountered: