New issue
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
Nimsuggest - Methods marked with {.base.} trigger error on chk #23581
Comments
Cant be reproed in the
|
I had the same problem as OP, but I guess the problem is that I was using nimlsp, the author of which hasn't kept it up to date with the latest nimsuggest protocol updates (as far as I can tell, even V3 hasn't been implemented). So the answer was to switch to nimlangserver. After switching, the |
So I can confirm if I run with explicit --v4 as above then yes it appears to work as expected. For me running either vscode integration or neovim with nimlangserver still shows errors. I've tried to see if I can find the protocol being chosen but my best guess is: Running: As an aside Why is the default protocol still v2? If v4 is generally better, shouldn't that be the default? |
Description
When working with dynamic dispatch base methods, IDE integrations which use nimsuggest and/or nimsuggest via the CLI trigger an error on the following code:
This code is directly lifted from tutorial https://nim-lang.org/docs/tut2.html#object-oriented-programming-dynamic-dispatch
The error in question is
method is not a base
When running nimsuggest chk on this code it reports (path was changed for privacy reasons)
Nim Version
Nim Compiler Version 2.0.4 [Linux: amd64]
Compiled at 2024-03-28
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: b47747d
active boot switches: -d:release -d:danger --gc:markAndSweep
Current Output
No response
Expected Output
No response
Possible Solution
No response
Additional Information
This manifested for me initially with the VSCode extension https://github.com/nim-lang/vscode-nim but own investigation appeared to be in nimsuggest
The text was updated successfully, but these errors were encountered: