This code only works fine with the import statement:
import os
when not (declared(commandLineParams)): # POSIX available?
echo("Your System ist not POSIX-Compatible.",
"Your Parameters cannot be determined because the required",
"Function is not available (commandLineParams).")
else: # Found POSIX!
echo("bla bla")
But VSCode marks 'os' as import not used... but it is used!
Is this a nim or a VSCode bug? and how can i fix it? (or work around: turn off this message!?)
its not really used. if you remove the os import, you still have a valid program. you are just checking if symbol is available, you are not requiring it.
mark import as {.used.}.