patch 8.2.0626: Vim9: wrong syntax of function in Vim9 script
Problem: Vim9: wrong syntax of function in Vim9 script.
Solution: Give error for missing space. Implement :echomsg and :echoerr.
(closes #5670)
diff --git a/src/userfunc.c b/src/userfunc.c
index 698c1b1..fa729bb 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -128,7 +128,13 @@
}
if (*p == ':')
{
- type = skipwhite(p + 1);
+ ++p;
+ if (!VIM_ISWHITE(*p))
+ {
+ semsg(_(e_white_after), ":");
+ return arg;
+ }
+ type = skipwhite(p);
p = skip_type(type);
type = vim_strnsave(type, p - type);
}