Ignore:
Timestamp:
Jun 30, 2018, 9:31:03 AM (4 years ago)
Author:
Maxim Reznik
Message:

Add Is_The_Same_Type function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ada-2012/src/semantic/gela-plain_type_views.adb

    r547 r552  
    444444      Matcher : Visitors.Type_Visitor;
    445445   begin
    446       if Expected.all in Type_View'Class and then
    447         Self.Def = Type_View'Class (Expected.all).Def
    448       then
     446      if Self.Is_The_Same_Type (Expected.all) then
    449447         return True;
    450448      end if;
     
    543541        | Gela.Type_Categories.An_Universal_Integer;
    544542   end Is_Signed_Integer;
     543
     544   ----------------------
     545   -- Is_The_Same_Type --
     546   ----------------------
     547
     548   overriding function Is_The_Same_Type
     549     (Left  : Type_View;
     550      Right : Gela.Types.Type_View'Class) return Boolean
     551   is
     552      use type Gela.Elements.Defining_Names.Defining_Name_Access;
     553   begin
     554      if Right in Type_View'Class then
     555         return Left.Name = Type_View'Class (Right).Name;
     556      end if;
     557
     558      return False;
     559   end Is_The_Same_Type;
    545560
    546561   ------------------
Note: See TracChangeset for help on using the changeset viewer.