diff options
Diffstat (limited to 'src/synth/synth-decls.adb')
-rw-r--r-- | src/synth/synth-decls.adb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb index 938860b0e..98485b6ff 100644 --- a/src/synth/synth-decls.adb +++ b/src/synth/synth-decls.adb @@ -792,10 +792,13 @@ package body Synth.Decls is Val := Synth_Subtype_Conversion (Ctxt, Val, Inter_Type, True, Assoc); - if not Is_Static (Val.Val) then + if Val = No_Valtyp then + Set_Error (Sub_Inst); + elsif not Is_Static (Val.Val) then Error_Msg_Synth (+Assoc, "value of generic %i must be static", +Inter); Val := No_Valtyp; + Set_Error (Sub_Inst); end if; Create_Object (Sub_Inst, Inter, Val); |