diff options
Diffstat (limited to 'src/vhdl/vhdl-sem_names.adb')
-rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index f67f8f98c..56aab131b 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -4548,7 +4548,10 @@ package body Vhdl.Sem_Names is Set_Named_Entity (Name, Expr); if Expr = Null_Iir then Error_Msg_Sem (+Name, "%n cannot be used as expression", +Name); - return Create_Error_Expr (Name, A_Type); + -- Note: this creates a loop. + Res := Create_Error_Expr (Name, A_Type); + Set_Named_Entity (Name, Res); + return Res; end if; if not Is_Overload_List (Expr) then |