(j3.2006) Did we intend this to be OK?
Van Snyder
Van.Snyder
Wed Oct 7 19:56:50 EDT 2015
Example:
type T1
contains
procedure, private :: P
generic, private :: G => P
end type T1
Then, (maybe) in a different module
type, extends(t1) :: T2
contains
procedure :: Q
generic :: G => Q
end type T2
then, somewhere
type(t1) :: X
type(t2) :: Y
Other than within the module where T1 is defined, one cannot reference
either x%p or x%g. One can (apparently) access x%p using y%g, even in a
different module.
Similarly:
type T1
contains
procedure :: P
generic :: G => P
end type T1
Then, (maybe) in a different module
type, extends(t1) :: T2
contains
procedure, private :: Q
generic, private :: G => Q
end type T2
then, somewhere
class(t1), pointer :: X
type(t2), target :: Y
x => y
One can access y%q using x%g.
Did we intend these to be OK?
I can't find a prohibition against it. The closest I've found is C471,
but that only covers one derived type.
If we didn't prohibit these, but intended to, does this need an interp?
More information about the J3
mailing list