-- If the root type or base type is generic, then we cannot fold. This
-- test is needed because subtypes of generic types are not always
-- marked as being generic themselves (which seems odd???)
+ --
+ -- Should this situation be addressed instead by either
+ -- a) setting Is_Generic_Type in more cases
+ -- or b) replacing preceding calls to Is_Generic_Type with calls to
+ -- Sem_Util.Some_New_Function
+ -- so that we wouldn't have to deal with these cases here ???
if Is_Generic_Type (P_Root_Type)
or else Is_Generic_Type (P_Base_Type)
+ or else (Present (Associated_Node_For_Itype (P_Base_Type))
+ and then Is_Generic_Type (Defining_Identifier
+ (Associated_Node_For_Itype (P_Base_Type))))
then
+ Set_Is_Static_Expression (N, False);
return;
end if;