Print

Print


Does the following code conform to the standard considering the
assignment interface as well as a type-bound generic?

module m
   type :: t
   contains
      procedure :: assign_class_t
      generic :: assignment(=) => assign_class_t
   end type
   interface assignment(=)
      module procedure assign_t
   end interface
contains
   subroutine assign_t( this, rhs )
      type(t), intent(out), allocatable :: this
      type(t), intent(in)  :: rhs
   end subroutine
   subroutine assign_class_t( this, rhs )
      class(t), intent(inout) :: this
      type(t), intent(in)     :: rhs
   end subroutine
end module m

Two processors I tried compiled the code with no errors.

Thanks,
Vipul Parekh