sem_ch3.adb (Derive_Progenitor_Subprograms): Add documentation.
authorJavier Miranda <miranda@adacore.com>
Wed, 28 May 2008 15:33:54 +0000 (17:33 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 28 May 2008 15:33:54 +0000 (17:33 +0200)
2008-05-28  Javier Miranda  <miranda@adacore.com>

* sem_ch3.adb (Derive_Progenitor_Subprograms): Add documentation.

From-SVN: r136104

gcc/ada/sem_ch3.adb

index 3dc47a37537b1fa9084d823ca4dddb3bc7aa0b89..88a44138039f0af0a49bbfabfa1a1468cf779a97 100644 (file)
@@ -11398,6 +11398,13 @@ package body Sem_Ch3 is
             while Present (Prim_Elmt) loop
                Iface_Subp := Node (Prim_Elmt);
 
+               --  Exclude derivation of predefined primitives except those
+               --  that come from source. Required to catch declarations of
+               --  equality operators of interfaces. For example:
+
+               --     type Iface is interface;
+               --     function "=" (Left, Right : Iface) return Boolean;
+
                if not Is_Predefined_Dispatching_Operation (Iface_Subp)
                  or else Comes_From_Source (Iface_Subp)
                then