(j3.2006) Mixing a type-bound generic with an "interface" generic procedure

Tobias Burnus burnus
Fri Dec 16 09:23:28 EST 2011


Dear all,

I am pretty sure that the following is invalid and that "12.4.3.4.5 
Restrictions on generic declarations" somehow must apply. However, I 
cannot nail it.

In the example below one has both an "interface assignment(=)" and a 
type-bound "generic :: assignment(=)".

   type, abstract :: sort_t
   contains
     generic :: assignment(=) =>  assign
     procedure(assign), deferred :: assign
     ...

   interface assignment(=)
     procedure assign
   end interface

...
   class(sort_t), intent(inout) :: a(:),tmp
   a(1) = tmp


I have two compilers which accept the code: one uses the external 
procedure "assign", the other uses the overridden type-bound procedure 
"assign". (I don't have a compiler which diagnoses the two "assign" as 
error.)

Tobias



More information about the J3 mailing list