When using generic names for defining structure constructor, fortls complains that Variable "NAME" declared twice in scope, even though this is allowed, based on an example from the standard:
module mytype_module
type mytype
private
complex value
logical exact
end type
interface mytype
module procedure int_to_mytype
end interface
! Operator definitions etc.
...
contains
type(mytype) function int_to_mytype(i)
integer,intent(in) :: i
int_to_mytype%value = i
int_to_mytype%exact = .true.
end function
! Procedures to support operators etc.
...
end
When using generic names for defining structure constructor, fortls complains that
Variable "NAME" declared twice in scope
, even though this is allowed, based on an example from the standard: