diff --git a/compiler2/ttcn3/Statement.cc b/compiler2/ttcn3/Statement.cc
index 9c69f8e8854fd2b73bf0ad4ed37ea5591b3816f9..b0e6c384f37992407d574c708317f012d6d8b4fc 100644
--- a/compiler2/ttcn3/Statement.cc
+++ b/compiler2/ttcn3/Statement.cc
@@ -189,7 +189,10 @@ namespace Ttcn {
         // is the same as the type of 'mtc' (which is given in 'runs on' clause)
       }
       return my_def->get_RunsOnType();
-    } else if (asstype == Common::Assignment::A_FUNCTION || asstype == Common::Assignment::A_ALTSTEP) {
+    } else if (asstype == Common::Assignment::A_FUNCTION ||
+               asstype == Common::Assignment::A_FUNCTION_RVAL ||
+               asstype == Common::Assignment::A_FUNCTION_RTEMP ||
+               asstype == Common::Assignment::A_ALTSTEP) {
       if (is_system) {
         return my_def->get_SystemType();
       } else {
diff --git a/regression_test/map_param/common.ttcn b/regression_test/map_param/common.ttcn
index fc9d4da709aa5cb84355e014445ca90536f0bf4b..93ea19ea475a0791073ac973215a0539285bdf93 100644
--- a/regression_test/map_param/common.ttcn
+++ b/regression_test/map_param/common.ttcn
@@ -67,4 +67,23 @@ function f_check_calls() runs on CT {
   }
 }
 
+function f_test_params_retval(CT p_comp) runs on CT system CT return integer {
+  var IntList v_p2 := P2_INITIAL;
+  map(p_comp:pt, system:pt) param (-, v_p2);
+  if (v_p2 != P2_FINAL) {
+    setverdict(fail, "Final value of parameter p2 is incorrect: ", v_p2);
+  }
+  
+  var integer v_p := P_INITIAL;
+  unmap(p_comp:pt, system:pt) param(v_p);
+  if (v_p != P_FINAL) {
+    setverdict(fail, "Final value of parameter p is incorrect: ", v_p);
+  }
+  
+  map(p_comp:pt, system:pt);
+  unmap(p_comp:pt, system:pt);
+  
+  return 0;
+}
+
 }
diff --git a/regression_test/map_param/single_mode/single.cfg b/regression_test/map_param/single_mode/single.cfg
index bca59449fbf09ec569ed0a89cfe43aedf2839f1a..fdadfc13eecd0ece58aa6ec1a5f3fddffa077046 100644
--- a/regression_test/map_param/single_mode/single.cfg
+++ b/regression_test/map_param/single_mode/single.cfg
@@ -17,4 +17,4 @@ ConsoleMask := TTCN_WARNING | TTCN_ERROR | TTCN_TESTCASE | TTCN_STATISTICS
 
 [EXECUTE]
 single_test.tc_single
-
+single_test.tc_single_retval
diff --git a/regression_test/map_param/single_mode/single_test.ttcn b/regression_test/map_param/single_mode/single_test.ttcn
index b172b303cb9873849f2e46c720cfa3d7b5937161..2b1d4e18156d298dc876e485e5756eadab9ecb08 100644
--- a/regression_test/map_param/single_mode/single_test.ttcn
+++ b/regression_test/map_param/single_mode/single_test.ttcn
@@ -20,4 +20,9 @@ testcase tc_single() runs on CT {
   f_check_calls();
 }
 
+testcase tc_single_retval() runs on CT {
+  f_test_params_retval(mtc);
+  f_check_calls();
+}
+
 }