diff src/vim9execute.c @ 19912:d4fa9db88d16 v8.2.0512

patch 8.2.0512: Vim9: no optional arguments in func type Commit: https://github.com/vim/vim/commit/5deeb3f1f9db4eabd36e99cbf857fe376eb37e10 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 5 17:08:17 2020 +0200 patch 8.2.0512: Vim9: no optional arguments in func type Problem: Vim9: no optional arguments in func type. Solution: Check for question mark after type. Find function reference without function().
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Apr 2020 17:15:25 +0200
parents f92435f0f449
children 1f42c49c3d29
line wrap: on
line diff
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -377,7 +377,7 @@ store_var(char_u *name, typval_T *tv)
     funccal_entry_T entry;
 
     save_funccal(&entry);
-    set_var_const(name, NULL, tv, FALSE, 0);
+    set_var_const(name, NULL, tv, FALSE, LET_NO_COMMAND);
     restore_funccal();
 }
 
@@ -739,7 +739,7 @@ call_def_function(
 
 		    --ectx.ec_stack.ga_len;
 		    if (di == NULL)
-			store_var(iptr->isn_arg.string, STACK_TV_BOT(0));
+			store_var(name, STACK_TV_BOT(0));
 		    else
 		    {
 			clear_tv(&di->di_tv);
@@ -1828,7 +1828,7 @@ ex_disassemble(exarg_T *eap)
 					       iptr->isn_arg.loadstore.ls_sid);
 
 		    smsg("%4d LOADS s:%s from %s", current,
-					    iptr->isn_arg.string, si->sn_name);
+				 iptr->isn_arg.loadstore.ls_name, si->sn_name);
 		}
 		break;
 	    case ISN_LOADG:
@@ -1865,7 +1865,7 @@ ex_disassemble(exarg_T *eap)
 					       iptr->isn_arg.loadstore.ls_sid);
 
 		    smsg("%4d STORES %s in %s", current,
-					    iptr->isn_arg.string, si->sn_name);
+				 iptr->isn_arg.loadstore.ls_name, si->sn_name);
 		}
 		break;
 	    case ISN_STORESCRIPT: