Skip to content
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

Error message for dummy procedure argument. #200

Open
caguerra opened this issue Jun 20, 2021 · 3 comments
Open

Error message for dummy procedure argument. #200

caguerra opened this issue Jun 20, 2021 · 3 comments

Comments

@caguerra
Copy link

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
Copy link

jfowkes commented Jul 5, 2021

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

@danabe74
Copy link

I have the same issue.

@gnikit
Copy link

gnikit commented Dec 12, 2021

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.

gnikit referenced this issue in fortran-lang/fortls Dec 12, 2021
Fixes Error message for dummy procedure argument. #200
gnikit referenced this issue in fortran-lang/fortls Dec 12, 2021
TODO: probably the workspace/symbol test will need to be moved into
a separate directory because it has to be edited every time a new test
is being added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants