File: test_scope_overreach.f90

package info (click to toggle)
fortran-language-server 3.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,268 kB
  • sloc: python: 9,688; f90: 1,195; fortran: 30; makefile: 28; ansic: 20
file content (28 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module m
    interface
        module subroutine sub(arg)
            integer :: arg
        end subroutine
    end interface
end module m

submodule (m) n

    use, intrinsic :: iso_fortran_env, only: int8, int16, int32, int64
    implicit none

    integer, parameter :: sp = selected_real_kind(6)
    integer, parameter :: dp = selected_real_kind(15)

contains

    pure recursive module function foo_sp(x) result(fi)
        real(sp), intent(in) :: x
        real(sp) :: fi
    end function foo_sp

    pure recursive module function foo_dp(x) result(fi)
        real(dp), intent(in) :: x
        real(dp) :: fi
    end function foo_dp
end submodule n