diff src/evalfunc.c @ 21186:34667dc9207b v8.2.1144

patch 8.2.1144: Vim9: return type of reverse() is any Commit: https://github.com/vim/vim/commit/67627355accff4af4f2a7e727c77ea8df675636e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 5 21:10:24 2020 +0200 patch 8.2.1144: Vim9: return type of reverse() is any Problem: Vim9: return type of reverse() is any. Solution: Use the type of the first argument.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Jul 2020 21:15:04 +0200
parents 2113e94dc726
children 3f14e0d4a4dd
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -842,7 +842,7 @@ static funcentry_T global_functions[] =
     {"rename",		2, 2, FEARG_1,	  ret_number,	f_rename},
     {"repeat",		2, 2, FEARG_1,	  ret_first_arg, f_repeat},
     {"resolve",		1, 1, FEARG_1,	  ret_string,	f_resolve},
-    {"reverse",		1, 1, FEARG_1,	  ret_any,	f_reverse},
+    {"reverse",		1, 1, FEARG_1,	  ret_first_arg, f_reverse},
     {"round",		1, 1, FEARG_1,	  ret_float,	FLOAT_FUNC(f_round)},
     {"rubyeval",	1, 1, FEARG_1,	  ret_any,
 #ifdef FEAT_RUBY