diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-08-11 21:15:01 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-08-11 21:15:01 +0200 |
commit | 51a346d55f192046583773eb72b515c89c343d45 (patch) | |
tree | 7b8c496aa55654abdcdf39a9fcb4f7b577c2d08f /src/vhdl/vhdl-sem_types.adb | |
parent | cdcbb258be1aefa2244b3a262863544d04d686f8 (diff) | |
download | ghdl-51a346d55f192046583773eb72b515c89c343d45.tar.gz ghdl-51a346d55f192046583773eb72b515c89c343d45.tar.bz2 ghdl-51a346d55f192046583773eb72b515c89c343d45.zip |
vhdl: add support for file subtype. Fix #2174
Diffstat (limited to 'src/vhdl/vhdl-sem_types.adb')
-rw-r--r-- | src/vhdl/vhdl-sem_types.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index eb3b7e9a7..dbc4230fb 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -521,7 +521,8 @@ package body Vhdl.Sem_Types is procedure Check_No_File_Type (El_Type : Iir; Loc : Iir) is begin case Get_Kind (El_Type) is - when Iir_Kind_File_Type_Definition => + when Iir_Kind_File_Type_Definition + | Iir_Kind_File_Subtype_Definition => Error_Msg_Sem (+Loc, "file type element not allowed in a composite type"); when Iir_Kind_Protected_Type_Declaration => @@ -1551,6 +1552,10 @@ package body Vhdl.Sem_Types is Set_Constraint_State (Res, Get_Constraint_State (Def)); Copy_Record_Elements_Declaration_List (Res, Def); + when Iir_Kind_File_Type_Definition => + Res := Create_Iir (Iir_Kind_File_Subtype_Definition); + Set_Text_File_Flag (Res, Get_Text_File_Flag (Def)); + when others => -- FIXME: todo (protected type ?) Error_Kind ("copy_subtype_indication", Def); |