This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Dynamic dispatch of class typebound procedures ~ methods
Janus,
> so I think the ordering of the formal vs. actual argument should be ok
> (of course gfc_type_compatible must be asymmetic in its arguments.
Yes, I agree with that. In fact, we should ideally leave
gfc_type_compatible the way that it is for ts1 a class and ts2 a
derived type, whereas for both of them classes, we should do the
parentage test the other way round. Unfortunately, this leads to
ambiguity problems with generic procedures. I guess that I will have
to mess with the typespec of the actual argument!
Just as an aside: Should the first test in gfc_type_compatible, with
ts1 a BT_CLASS not be split into separate cases for ts1 BT_DERIVED (as
it is at present) and for BT_CLASS (take the typespec of the data
component)?
Cheers
Paul