vscode-nim icon indicating copy to clipboard operation
vscode-nim copied to clipboard

Callback function is recognized as unused

Open sveri opened this issue 6 years ago • 2 comments

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.

sveri avatar Feb 16 '20 14:02 sveri

have you configured your main module as the project file?

RSDuck avatar Feb 16 '20 14:02 RSDuck

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

sveri avatar Feb 16 '20 14:02 sveri