Mercurial > vim
diff src/list.c @ 24438:5c6ccab68d1e v8.2.2759
patch 8.2.2759: Vim9: for loop infers type of loop variable
Commit: https://github.com/vim/vim/commit/f2253963c28e4791092620df6a6bb238c33168df
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Apr 13 20:53:13 2021 +0200
patch 8.2.2759: Vim9: for loop infers type of loop variable
Problem: Vim9: for loop infers type of loop variable.
Solution: Do not get the member type. (closes https://github.com/vim/vim/issues/8102)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 13 Apr 2021 21:00:05 +0200 |
parents | d406858354a6 |
children | 3d5a66e478f8 |
line wrap: on
line diff
--- a/src/list.c +++ b/src/list.c @@ -2059,7 +2059,7 @@ filter_map(typval_T *argvars, typval_T * { // Check that map() does not change the type of the dict. ga_init2(&type_list, sizeof(type_T *), 10); - type = typval2type(argvars, get_copyID(), &type_list); + type = typval2type(argvars, get_copyID(), &type_list, TRUE); } if (argvars[0].v_type == VAR_BLOB) @@ -2565,7 +2565,7 @@ extend(typval_T *argvars, typval_T *rett { // Check that map() does not change the type of the dict. ga_init2(&type_list, sizeof(type_T *), 10); - type = typval2type(argvars, get_copyID(), &type_list); + type = typval2type(argvars, get_copyID(), &type_list, TRUE); } if (argvars[0].v_type == VAR_LIST && argvars[1].v_type == VAR_LIST)