hansec / fortran-language-server

Fortran Language Server for the Language Server Protocol
MIT License
296 stars 57 forks source link

Error message for dummy procedure argument. #200

Open caguerra opened 3 years ago

caguerra commented 3 years ago

In the following module example, declaring implicit none to detect implicit types for variables like "x" generates the following error message for the dummy procedure f: "No matching declaration found for argument "f"". Also, if the type declaration of "x" is uncommented then the warning message "Variable "x" masks variable in parent scope" appears, for variable "x" in the interface.

module test

    implicit none 

    contains

        subroutine foo(f)

            interface
                function f(x)
                    real, intent(in) :: x
                    real :: f
                end function
            end interface
            !real :: x

            x = 1.
            print*, f(x)

        end subroutine

end module
jfowkes commented 3 years ago

I am also seeing this issue in my fortran subroutines that take interfaces as dummy arguments.

danabe74 commented 3 years ago

I have the same issue.

gnikit commented 2 years ago

Okay so I finally got some spare time and have a fix for this. I will open a PR but given that the repo hasn't been updated in more than a year I will most likely be authoring a fortls2 or a dev version of fortls so people can start using a more up to date version.