Bill,
Thanks much for your response.
Note I think the original code and your longer example are
non-conforming on account of an ambiguous interface.
What I sent in my first note can be viewed simply as syntactic sugar
for the following:
module m
type :: t
end type
interface assignment(=)
module procedure assign_1
module procedure assign_2
end interface
contains
subroutine assign_1( this, rhs )
type(t), intent(out), allocatable :: this
type(t), intent(in) :: rhs
end subroutine
subroutine assign_2( this, rhs )
class(t), intent(inout) :: this
type(t), intent(in) :: rhs
end subroutine
end module m
in which case the compiler will throw an error about ambiguity in the
generic interface, will it not? The fact the original code has a
type-bound generic shouldn't get away with this, or can it?!
Regards,
Vipul Parekh
|