diff options
Diffstat (limited to 'gcc/ada/sem_ch13.adb')
-rw-r--r-- | gcc/ada/sem_ch13.adb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 9d452b13ea5..630892a4a9f 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -5939,6 +5939,20 @@ package body Sem_Ch13 is procedure Replace_Type_Reference (N : Node_Id) is begin + + -- Add semantic information to node to be rewritten, for ASIS + -- navigation needs. + + if Nkind (N) = N_Identifier then + Set_Entity (N, T); + Set_Etype (N, T); + + elsif Nkind (N) = N_Selected_Component then + Analyze (Prefix (N)); + Set_Entity (Selector_Name (N), T); + Set_Etype (Selector_Name (N), T); + end if; + -- Invariant'Class, replace with T'Class (obj) if Class_Present (Ritem) then |