diff options
Diffstat (limited to 'src/vhdl/sem_names.adb')
-rw-r--r-- | src/vhdl/sem_names.adb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/vhdl/sem_names.adb b/src/vhdl/sem_names.adb index da8637f82..03c1f1e40 100644 --- a/src/vhdl/sem_names.adb +++ b/src/vhdl/sem_names.adb @@ -889,16 +889,14 @@ package body Sem_Names is Atype : Iir; Res : Iir; begin - if Name = Null_Iir then - pragma Assert (Flags.Flag_Force_Analysis); - Res := Create_Error_Type (Null_Iir); - Set_Type (Res, Res); - return Res; - end if; - -- The name must not have been analyzed. pragma Assert (Get_Type (Name) = Null_Iir); + if Is_Error (Name) then + Set_Type (Name, Name); + return Name; + end if; + -- Analyze the name (if not already done). Res := Get_Named_Entity (Name); if Res = Null_Iir then |