Skip to content

Functions returning arrays hover handling #50

Description

@gnikit

Currently hovering on a function that returns an array will either produce the variable signature (which is incorrect and has now been fixed in PR #49 ) or it will display the function signature with the array dimensions in the function definition.

Although that is convenient, the hover request displays invalid FORTRAN syntax which in turn causes syntax highlighting in VSCode to break. IMO all parts of the server, except snippets which contain placeholders, should be producing valid FORTRAN syntax.

I propose the following hover message

real function foo(arg) result(val)
  real, intent(in) :: arg
  real, dimension(10,10) :: val

instead of

real dimension(10,10) function foo(arg) result(val)
  real, intent(in) :: arg

This would also mean that #47 would now have to include an additional line with the result variable at all times

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions