diff src/userfunc.c @ 20532:cb4831fa7e25 v8.2.0820

patch 8.2.0820: Vim9: function type isn't set until compiled Commit: https://github.com/vim/vim/commit/6ff71d8b7fbdf667a2f119a2487302e240961816 Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 24 23:45:24 2020 +0200 patch 8.2.0820: Vim9: function type isn't set until compiled Problem: Vim9: function type isn't set until compiled. Solution: Set function type early.
author Bram Moolenaar <Bram@vim.org>
date Mon, 25 May 2020 00:00:04 +0200
parents 489cb75c76b6
children 9f921ba86d05
line wrap: on
line diff
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3284,6 +3284,9 @@ def_function(exarg_T *eap, char_u *name_
 	is_export = FALSE;
     }
 
+    if (eap->cmdidx == CMD_def)
+	set_function_type(fp);
+
     goto ret_free;
 
 erret: