diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-04 20:45:20 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-04 20:45:20 +0200 |
commit | d7e1a3b886f8362c9857c3f9a0ea3f6a13a1ee53 (patch) | |
tree | 48ac77407b7468928946455f03b66bc5cacf58bb | |
parent | 845f181d0b66e9d917988566ab9e0e8e9f258d9a (diff) | |
download | ghdl-d7e1a3b886f8362c9857c3f9a0ea3f6a13a1ee53.tar.gz ghdl-d7e1a3b886f8362c9857c3f9a0ea3f6a13a1ee53.tar.bz2 ghdl-d7e1a3b886f8362c9857c3f9a0ea3f6a13a1ee53.zip |
sem_stmts: check retriction for character type of case expression.
-rw-r--r-- | src/vhdl/sem_stmts.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vhdl/sem_stmts.adb b/src/vhdl/sem_stmts.adb index b8f85e5fc..75a223e5e 100644 --- a/src/vhdl/sem_stmts.adb +++ b/src/vhdl/sem_stmts.adb @@ -1075,8 +1075,9 @@ package body Sem_Stmts is return; end if; El_Type := Get_Base_Type (Get_Element_Subtype (Choice_Type)); - if Get_Kind (El_Type) /= Iir_Kind_Enumeration_Type_Definition then - -- FIXME: check character. + if Get_Kind (El_Type) /= Iir_Kind_Enumeration_Type_Definition + or else not Get_Is_Character_Type (El_Type) + then Error_Msg_Sem (+Choice, "element type of the expression must be a character type"); |