changeset 31978:c1b076c53a38 v9.0.1321

patch 9.0.1321: vimscript test fails where using {expr} syntax Commit: https://github.com/vim/vim/commit/d114975b9bec30ec1486ebc70db6b802d0f1cfb8 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 18 15:31:53 2023 +0000 patch 9.0.1321: vimscript test fails where using {expr} syntax Problem: vimscript test fails where using {expr} syntax. Solution: Only return FCERR_FAILED in call_user_func() for Vim9 script.
author Bram Moolenaar <Bram@vim.org>
date Sat, 18 Feb 2023 16:45:03 +0100
parents 1faf76a9e05d
children e13e9924e503
files src/userfunc.c src/version.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3060,7 +3060,11 @@ call_user_func(
 	clear_tv(rettv);
 	rettv->v_type = VAR_NUMBER;
 	rettv->vval.v_number = -1;
-	retval = FCERR_FAILED;
+
+	// In corner cases returning a "failed" value is not backwards
+	// compatible.  Only do this for Vim9 script.
+	if (in_vim9script())
+	    retval = FCERR_FAILED;
     }
 
 #ifdef FEAT_PROFILE
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1321,
+/**/
     1320,
 /**/
     1319,