CreateThread doesn't accept functions with generics #43

Closed
Amrykid opened this Issue Jul 28, 2011 · 0 comments

Projects

None yet

2 participants

@Amrykid
Contributor
Amrykid commented Jul 28, 2011

My code -> https://gist.github.com/1110749 (although, the code was altered for issue #42)
When you try to pass a function to createThread, if it depends on generics for one of its arguments, the compiler will not accept it.

parallel.nim(24, 17) Error: type mismatch: got (TThread[TThreadFuncArgs[int]], proc(TThreadFuncArgs[int]), TThreadFuncArgs[int])
but expected one of:
createThread(t: var TThread[TMsg], tp: proc (TMsg){.thread.}, param: TMsg)
createThread(t: var TThread[TMsg], tp: proc (){.thread.})
@Araq Araq added a commit that closed this issue Aug 7, 2011
@Araq Araq fixes #35, fixes #43 26ab647
@Araq Araq closed this in 26ab647 Aug 7, 2011
@reactormonk reactormonk pushed a commit to reactormonk/nim that referenced this issue Apr 7, 2014
@Araq Araq fixes #35, fixes #43 5dd0432
@Araq Araq added a commit that referenced this issue Dec 18, 2016
@Araq Araq fixes nimsuggest bug #43 7bbf74e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment