(j3.2006) About extending abstract types with deferred bindings
Lionel, Steve
steve.lionel
Wed Sep 7 12:59:54 EDT 2016
F08/0052 (see http://j3-fortran.org/doc/year/11/11-207r1.txt for final
wording) discusses an abstract type with a private, deferred type-bound
procedure and asks about extending that type in another module that makes
the type accessible by use association. The interp's edit adds the words "an
accessible" to:
If a specific type-bound procedure specified in a type definition has the
same binding name as an accessible
3 type-bound procedure from the parent type then the binding specified in
the type definition overrides the one
4 from the parent type.
I can follow that. However, the text and answer to Q3 say, respectively,
".the
definition of type t2 would seem to be defective in that (7) must be
defining a new type-bound procedure, and not overriding the type-bound
procedure defined at (6), and that therefore t2 still has a deferred
type-bound procedure. That would mean that an abstract type with a
private deferred type-bound procedure could not be extended outside of
the module in which it is defined: is that correct?" and
"Yes, an abstract type with a private deferred type-bound procedure
cannot be extended outside the defining module, because it is
otherwise impossible to override the private type-bound procedure."
This clearly suggests that there is a rule specifying that all deferred
bindings in an abstract type must be overridden when extended, but I can't
find it and I have tried many ways to search in F2003, 2008 and 16-007r2.
Yet it must be there somewhere as the interp references it and Intel Fortran
insists it be followed. What have I missed?
This comes up because a couple of our customers bemoaned the restriction in
F08/0052, saying "The result of the interp results in a capability gap for
authors when they want a binding that can be overriden but not invoked", and
asked that such a capability be provided in a future standard.
Steve Lionel
Intel Developer Support
Merrimack, NH
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.j3-fortran.org/pipermail/j3/attachments/20160907/8e18605d/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6616 bytes
Desc: not available
Url : http://mailman.j3-fortran.org/pipermail/j3/attachments/20160907/8e18605d/attachment-0001.bin
More information about the J3
mailing list