------- Comment #5 from sam at gcc dot gnu dot org  2008-04-24 08:36 -------
Ahn Vo: Pak2.Eq is *the same* as Pak1.Eq, that's the whole point. Thus both
consider only T1 aspects of the objects.

What you say would be true if the code had been:

   package Pak1 is
      type T1 is tagged null record;
      function Eq(X, Y: T1) return Boolean renames "=";
   end Pak1;

   package Pak2 is
      type T2 is new Pak1.T1 with record
         F1: Integer;
      end record;
      function Eq(X, Y: T2) return Boolean renames "=";   -- This line added
   end Pak2;

But there is no such line in the original example. In the original example,
Pak2.Eq is *not* the "=" operator on T2, it is the "=" operator on T1 objects.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32181

Reply via email to