diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 0266a494e..b480d797f 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -11533,7 +11533,11 @@ package body Vhdl.Parse is is End_Loc : Location_Type; begin - Set_Library_Unit (Unit, Decl); + if Get_Kind (Unit) = Iir_Kind_Context_Declaration then + Error_Msg_Parse ("nested context declaration not allowed"); + else + Set_Library_Unit (Unit, Decl); + end if; -- Skip 'is' Scan; |