pragmagic / vscode-nim

An extension for VS Code which provides support for the Nim language.
Other
235 stars 38 forks source link

Callback function is recognized as unused #148

Open sveri opened 4 years ago

sveri commented 4 years ago

I have the following code:

proc startAsyncServer() =
  ...

proc run*() =
  for i in 0 ..< numberCores:
    createThread[void](threads[i], startAsyncServer)
...

the startAsyncServer proc is reported as unused: 'startAsyncServer' is declared but not used [XDeclaredButNotUsed], but only by the plugin and not by the compiler.

RSDuck commented 4 years ago

have you configured your main module as the project file?

sveri commented 4 years ago

Initially not, but I just tried it and it is still reported as not used. So, unfortunately this does not help.