if Class_Present (N) then
-- Verify that a class-wide condition is legal, i.e. the operation is
- -- a primitive of a tagged type. Note that a generic subprogram is
- -- not a primitive operation.
+ -- a primitive of a tagged type.
- Disp_Typ := Find_Dispatching_Type (Spec_Id);
-
- if No (Disp_Typ) or else Is_Generic_Subprogram (Spec_Id) then
+ if not Is_Dispatching_Operation (Spec_Id) then
Error_Msg_Name_1 := Original_Aspect_Pragma_Name (N);
if From_Aspect_Specification (N) then
-- Remaining semantic checks require a full tree traversal
else
+ Disp_Typ := Find_Dispatching_Type (Spec_Id);
Check_Class_Wide_Condition (Expr);
end if;