diff options
-rw-r--r-- | src/synth/synth-expr.adb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/synth/synth-expr.adb b/src/synth/synth-expr.adb index 953c6e0e9..a4dd36ea7 100644 --- a/src/synth/synth-expr.adb +++ b/src/synth/synth-expr.adb @@ -822,6 +822,7 @@ package body Synth.Expr is or else Vtype.Kind = Type_Slice); return Vt; when Type_Record => + pragma Assert (Vtype.Kind = Type_Record); -- TODO: handle elements. return Vt; when Type_Unbounded_Record => @@ -829,12 +830,12 @@ package body Synth.Expr is return Vt; when Type_Access => return Vt; - when Type_File => - pragma Assert (Vtype = Dtype); - return Vt; - when Type_Protected => - pragma Assert (Vtype = Dtype); - return Vt; + when Type_File + | Type_Protected => + -- No conversion expected. + -- As the subtype is identical, it is already handled by the + -- above check. + raise Internal_Error; end case; end Synth_Subtype_Conversion; |