(j3.2006) About extending abstract types with deferred bindings
Cohen Malcolm
malcolm
Thu Sep 8 21:05:16 EDT 2016
Right, and instantiating it is not allowed.
There is no conjecture here.
It is actively prohibited.
You are not allowed to instantiate it ever, whether that is in the context
of a tbp invocation or not!!! Instantiating it *ever* would allow the
deferred tbp to be eventually invoked. That's why we do not allow that.
Any constraint on invocation would be completely and utterly ineffective.
Or at best redundant.
-----Original Message-----
From: Van Snyder
Sent: Friday, September 9, 2016 3:26 AM
To: j3 at mailman.j3-fortran.org
Subject: Re: (j3.2006) About extending abstract types with deferred bindings
On Thu, 2016-09-08 at 17:28 +0900, Cohen Malcolm wrote:
> Your ancestor component *IS* an object of abstract type.
Right, but it *IS* instantiated. We can't rely on the conjecture that
it's impossible to instantiate an object of abstract type to prevent
invoking deferred procedures bound to their types. We need actively to
prohibit using them. Is there a constraint that does this? I haven't
found it yet.
>
> -----Original Message-----
> From: Van Snyder
> Sent: Thursday, September 8, 2016 5:22 PM
> To: j3 at mailman.j3-fortran.org
> Subject: Re: (j3.2006) About extending abstract types with deferred
> bindings
>
> On Thu, 2016-09-08 at 17:15 +0900, Cohen Malcolm wrote:
> > <<<
> > Is there a prohibition against invoking an accessible deferred
> > procedure
> > binding using an abstract ancestor component of a non-abstract object?
> > >>>
> >
> > In effect. The rules prevent instantiating an object of abstract type
> > in
> > the first place.
>
> You don't need an object of abstract type to do this. An ancestor
> component of abstract type, of an object of concrete type, is of
> abstract type. The object of concrete type can be instantiated.
>
> type, abstract :: T1
> ...
> contains
> procedure(...), deferred :: P1
> end type T1
>
> type, extends(t1) :: T2
> ...
> contains
> procedure(...) :: P1
> end type T2
>
> type(t2) :: X
>
> call x%t1%p1
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.
> ________________________________________________________________________
>
_______________________________________________
J3 mailing list
J3 at mailman.j3-fortran.org
http://mailman.j3-fortran.org/mailman/listinfo/j3
________________________________________________________________________
This e-mail has been scanned for all viruses by Star.
________________________________________________________________________
--
........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list