Skip to content

Add support for GoTo Implementation in submodules #74

Description

@gha3mi

fortls can detect the interface in a module, but not its implementation in a submodule, see this example.

MODULE MOD

IMPLICIT NONE

!==============================================================================
TYPE :: TYP
    REAL(KIND=8) :: value
CONTAINS
    PROCEDURE :: PRC1 => PRC_PRC1
END TYPE TYP
!==============================================================================


!==============================================================================
INTERFACE
    MODULE  SUBROUTINE PRC_PRC1(this)

        IMPLICIT NONE

        CLASS(TYP), INTENT(INOUT) :: this

    END SUBROUTINE PRC_PRC1
END INTERFACE
!==============================================================================

END MODULE MOD
SUBMODULE(MOD) SMOD

IMPLICIT NONE

CONTAINS

!==============================================================================
MODULE SUBROUTINE PRC_PRC1(this)

    IMPLICIT NONE

    CLASS(TYP), INTENT(INOUT) :: this

    this%value = 0

END SUBROUTINE PRC_PRC1
!==============================================================================

END SUBMODULE SMOD

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions