-
Notifications
You must be signed in to change notification settings - Fork 55
Private variable declaration in module seen in other scopes #191
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
Comments
So this is caused by fortls (sometimes?) not respecting the module scopes. I think there a few more issues that are caused from this, especially when it comes to autocompletion. |
The extend of this bug is generally related to visibility scopes and modules. If I remember correctly all modules are |
Thanks, but lately I haven't been able to have fortls working in my vscode at all... I am bit confused on what should be installed: |
I think that might be a mistake on my end in the pre release of Modern Fortran. If you have turned on an option for disabling fortls it will skip registering the server all together see fortran-lang/vscode-fortran-support#365 . |
Ok, I had time to fix my setup and everything works. I can confirm that this fixes the issue and I don't see anymore the error. Just for completeness and future reference, this is the current setup with which I managed to have it working: |
Hi
I am using the fortran language server (FLS) in vscode, so I am not sure if it is a problem of the extension I am using, or the FLS itself. I suspect the second.
I have a private variable declared in a module with the same name as an intrinsic fortran keyword:
Somewhere else in the code, I declare
And vscode (through the FLS) is marking it as an error and saying 'object "len" not found in scope' and points me to the module above.
Furthermore, if I start typing
the auto completion suggests me the variable
len
even though this is private and should not be seen. Indeed, trying to use the variablelen
anywhere else in the code runs into a compilation error withgfortran
.Any idea on what is going on?
The text was updated successfully, but these errors were encountered: