diff options
Diffstat (limited to 'sem_scopes.adb')
-rw-r--r-- | sem_scopes.adb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sem_scopes.adb b/sem_scopes.adb index 7737ed881..3acb6b141 100644 --- a/sem_scopes.adb +++ b/sem_scopes.adb @@ -832,13 +832,17 @@ package body Sem_Scopes is Inter : Name_Interpretation_Type; begin Inter := Get_Interpretation (Id); - if Get_Declaration (Inter) /= Old then - raise Internal_Error; - end if; + loop + exit when Get_Declaration (Inter) = Old; + Inter := Get_Next_Interpretation (Inter); + if not Valid_Interpretation (Inter) then + raise Internal_Error; + end if; + end loop; + Interpretations.Table (Inter).Decl := Decl; if Get_Next_Interpretation (Inter) /= No_Name_Interpretation then raise Internal_Error; end if; - Interpretations.Table (Inter).Decl := Decl; end Replace_Name; procedure Name_Visible (Ident : Name_Id; Decl : Iir) |