OFF icon indicating copy to clipboard operation
OFF copied to clipboard

Unlimited polymorphic pointers violate standard

Open szaghi opened this issue 9 years ago • 0 comments

The standard (2003/2008) seems to not allow a typed pointer to point an unlimited polymorphic one, e.g. the following seems to be not standard:

class(*), pointer:: foo
type(mytype), pointer:: bar

bar => foo
call bar%mymethod(...)

Presently, such a pointers association is widely used in OFF, e.g. https://github.com/szaghi/OFF/blob/testing/src/Data_Type_Tree.f90#L210 and https://github.com/szaghi/OFF/blob/testing/src/Data_Type_Global.f90#L130.

Think to a workaround.

szaghi avatar Apr 12 '15 08:04 szaghi