patch 8.2.4460: Vim9: wrong error for defining dict function

Problem:    Vim9: wrong error for defining dict function.
Solution:   Explicitly check for trying to define a dict function.
            (closes 9827)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 6eb6e16..8987123 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -831,7 +831,11 @@
     {
 	if (!ends_excmd2(name_start, name_end))
 	{
-	    semsg(_(e_invalid_command_str), eap->cmd);
+	    if (*skipwhite(name_end) == '.')
+		semsg(_(e_cannot_define_dict_func_in_vim9_script_str),
+								     eap->cmd);
+	    else
+		semsg(_(e_invalid_command_str), eap->cmd);
 	    return NULL;
 	}