hansec / fortran-language-server

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

Overloaded functions #135

Open JHenneberg opened 5 years ago

JHenneberg commented 5 years ago

When I have an overloaded function and try to find the reference it would be nice if it would be possible to jump right away to the correct funtion and not the interface

MODULE myMOD
  IMPLICIT NONE
  PRIVATE
  PUBLIC :: integrate
  INTERFACE integrate
    MODULE PROCEDURE int_2D
    MODULE PROCEDURE int_3D
  END INTERFACE integrate
CONTAINS
  SUBROUTINE int_2D(x, y)
    IMPLICIT NONE
    REAL(8), INTENT(IN) :: x, y
  END SUBROUTINE int2D

  SUBROUTINE int_3D(x, y, z)
    IMPLICIT NONE
    REAL(8), INTENT(IN) :: x, y, z
  END SUBROUTINE int_3D
END MODULE myMOD

PROGRAM myProgram
  USE myMOD
  IMPLICIT NONE
  REAL(8) :: x, y
  x = 1.D0
  y = 2.D0
  CALL integrate(x, y) ! trying to catch the reference will result in a jump to the interface block
END PROGRAM myProgram