0
0
mirror of https://github.com/vim/vim.git synced 2025-10-12 06:44:06 -04:00

patch 8.2.0973: Vim9: type is not checked when assigning to a script variable

Problem:    Vim9: type is not checked when assigning to a script variable.
Solution:   Check the type.
This commit is contained in:
Bram Moolenaar
2020-06-13 19:00:10 +02:00
parent c82a5b5da5
commit 34db91f7a4
7 changed files with 51 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
/* vim9compile.c */
int check_defined(char_u *p, int len, cctx_T *cctx);
type_T *typval2type(typval_T *tv);
int check_type(type_T *expected, type_T *actual, int give_msg);
char_u *skip_type(char_u *start);
type_T *parse_type(char_u **arg, garray_T *type_gap);
char *vartype_name(vartype_T type);

View File

@@ -7,4 +7,5 @@ void ex_import(exarg_T *eap);
int find_exported(int sid, char_u **argp, int *name_len, ufunc_T **ufunc, type_T **type);
char_u *handle_import(char_u *arg_start, garray_T *gap, int import_sid, void *cctx);
char_u *vim9_declare_scriptvar(exarg_T *eap, char_u *arg);
void check_script_var_type(typval_T *dest, typval_T *value, char_u *name);
/* vim: set ft=c : */