aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-stmts.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/synth-stmts.adb')
-rw-r--r--src/synth/synth-stmts.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index e6a65d465..bc9884af1 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -1531,7 +1531,7 @@ package body Synth.Stmts is
begin
if Expr /= Null_Node then
-- Return in function.
- Val := Synth_Expression (C.Inst, Expr);
+ Val := Synth_Expression_With_Type (C.Inst, Expr, C.Ret_Typ);
Val := Synth_Subtype_Conversion (Val, C.Ret_Typ, False, Stmt);
if C.Nbr_Ret = 0 then