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().
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 54f95bf..237b024 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -377,7 +377,7 @@
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 @@
--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 @@
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 @@
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: