patch 8.2.3229: Vim9: runtime and compile time type checks are not the same
Problem: Vim9: runtime and compile time type checks are not the same.
Solution: Add more runtime type checks for builtin functions. (Yegappan
Lakshmanan, closes #8646)
diff --git a/src/undo.c b/src/undo.c
index 171e817..8141301 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -3646,6 +3646,9 @@
void
f_undofile(typval_T *argvars UNUSED, typval_T *rettv)
{
+ if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
+ return;
+
rettv->v_type = VAR_STRING;
#ifdef FEAT_PERSISTENT_UNDO
{