J3/03-110r2 To: J3 From: John Reid Subject: Edits for polymorphic association Date: 2 April 2003 Summary Polymorphic objects of CLASS(My_Type) need to occasionally be used in places where a non-polymorphic object of the declared type TYPE(My_Type) is needed. The present standard allows these to be intermixable in certain occasions, such as argument association (see 265:6) and assignment (see 139:8, and also 73:35), but not in others, notably, in pointer assignment (see 143:1). This is very evidently an inconsistency and needs to be fixed. The problem: one cannot at present do: TYPE(base_type), POINTER :: non_polymorphic CLASS(base_type), POINTER :: polymorphic non_polymorphic=>polymorphic because of C716. The following edits also allow for pointer and argument association between a nonpolymorphic object and the appropriate component of a nonpolymorphic object. Edits 56:20 (of J3/03-166). Add at line end 'An <> of an object is the parent component of the object or an ancestor component of the parent component.' 142:35: Delete C716 (C717 at 143:1 is enough) 143:30-. Add paragraph 'If is not polymorphic and is polymorphic with dynamic type that differs from its declared type, the assignment target is the ancestor component of that has the type of . Otherwise, the assignment target is .' 143:30 Change second '' to 'the assignment target'. 143:32 Change 'the same object' to 'the assignment target'. 265:10. Add at line end 'If the dummy argument is neither allocatable nor a pointer and if the actual argument is polymorphic with dynamic type that differs from its declared type, the dummy argument is associated with the ancestor component of the actual argument that has the type of the dummy argument.'