You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When somewhere in a project one uses kind as a variable name, then in other places in variable declarations the kind keyword becomes underlined as an error: "object kind not found in scope" (as shown in the screenshot below).
Below is the code to reproduce the problem. if you rename the variable inside the program section from kind to kind_ the error highlighting inside the function disappears:
module test_module
implicit nonecontainsfunctionecho(num) result (res)
implicit none
! the line below is treated as problematic, depending on the variable name inside the program test (if there is no variable named kind, no problem)
integer (kind=4) :: res, num
print*, num +1
res =0endfunction echo
end module test_module
program test
use test_module
implicit none
! try renaming kind to toggle behavior
integer:: kind, res
kind =10
res = echo(kind)
end program test
Is there an existing issue for this?
Description
When somewhere in a project one uses kind as a variable name, then in other places in variable declarations the kind keyword becomes underlined as an error: "object kind not found in scope" (as shown in the screenshot below).
Below is the code to reproduce the problem. if you rename the variable inside the program section from
kind
tokind_
the error highlighting inside the function disappears:Screenshots
Expected Behaviour
Should not be reported as an error.
Version of Modern Fortran
v3.2.0
Version of Visual Studio Code
v1.69.2
Platform and Architecture
Linux
Additional Information
Linked to #173
The text was updated successfully, but these errors were encountered: