diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-04 15:17:03 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-04 15:17:03 +0000 |
commit | 078a46161e8b1b30bf306d6c1f4f0af7c616a989 (patch) | |
tree | 334c2fa968e1641524028ac18afedf5980446e64 /src/dict.c | |
parent | 9acf2d8be93f3b50607279e7f3484b019675d0a7 (diff) | |
download | vim-git-078a46161e8b1b30bf306d6c1f4f0af7c616a989.tar.gz |
patch 8.2.3996: Vim9: type checking lacks information about declared typev8.2.3996
Problem: Vim9: type checking for list and dict lacks information about
declared type.
Solution: Add dv_decl_type and lv_decl_type. Refactor the type stack to
store two types in each entry.
Diffstat (limited to 'src/dict.c')
-rw-r--r-- | src/dict.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dict.c b/src/dict.c index b3cdfd9b9..27cde11a3 100644 --- a/src/dict.c +++ b/src/dict.c @@ -109,6 +109,8 @@ dict_free_contents(dict_T *d) hashtab_free_contents(&d->dv_hashtab); free_type(d->dv_type); d->dv_type = NULL; + free_type(d->dv_decl_type); + d->dv_decl_type = NULL; } /* @@ -1354,8 +1356,7 @@ dict_filter_map( if (filtermap == FILTERMAP_MAP) { if (argtype != NULL && check_typval_arg_type( - argtype->tt_member, &newtv, - func_name, 0) == FAIL) + argtype->tt_member, &newtv, func_name, 0) == FAIL) { clear_tv(&newtv); break; |