I'm trying to use parameterized derived types and have run into a problem which I have distilled into the following code:
module t_mod implicit none type T(k) integer, kind :: k = 4 integer(kind=k) :: d contains procedure, public, pass(x) :: check_v end type T contains logical function check_v(k, x) integer :: k class(T) :: x check_v = (k == x%d) end function check_v end module t_mod
I get the following compilation error:
error #8262: For a type-bound procedure that has the PASS binding attribute, the first dummy argument must have the same declared type as the type being defined. [K]
How should I declare k in order for this to compile ?
Thanks.