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

Signature help - array constructor/function call not recognised as argument #178

Open
michaelkonecny opened this issue Oct 7, 2020 · 0 comments
Labels

Comments

@michaelkonecny
Copy link
Contributor

Hello,
hope you're good.

If I have a subroutine such as

subroutine mySubroutine(a, b, c, d, e)
    ! ...        
end subroutine

and I'm writing a call to it, like this:

call mySubroutine(a, [1, 2, 3], c)

my cursor being just behind c
and I invoke signature help, it doesn't seem to recognise the array constructor [1, 2, 3] as a single argument.
Instead it thinks I'm already at the 5th parameter (e), probably because four commas have preceded.

The same thing happens with the old-fashioned array constructor:

call mySubroutine(a, (/1, 2, 3/), c)

If I try to use a result of a function as an argument, the same behaviour occurs:

function myFunction(a, b, c, d, e) result(x)
    ! ...        
end function

x = myFunction(a, myFunction(a, b, c), c)

I guess the function call parser can't really recognise objects that can return temporary variables. This could be improved.

@michaelkonecny michaelkonecny changed the title Signature help - array constructor/function call not recognised Signature help - array constructor/function call not recognised as argument Oct 7, 2020
@hansec hansec added the bug label Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants