aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/synth/synth-expr.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb
index 3ac24cded..c447bef85 100644
--- a/src/synth/synth-expr.adb
+++ b/src/synth/synth-expr.adb
@@ -1661,8 +1661,13 @@ package body Synth.Expr is
when others =>
Error_Msg_Synth
(+Conv, "unhandled type conversion (to array)");
- return Val;
+ return null;
end case;
+ when Iir_Kind_Enumeration_Type_Definition
+ | Iir_Kind_Enumeration_Subtype_Definition =>
+ pragma Assert (Get_Base_Type (Get_Type (Expr))
+ = Get_Base_Type (Conv_Type));
+ return Val;
when others =>
Error_Msg_Synth (+Conv, "unhandled type conversion");
return null;