Mercurial > vim
comparison src/vim9compile.c @ 26937:7045e9308ca3 v8.2.3997
patch 8.2.3997: Vim9: not enough testing for extend() and map()
Commit: https://github.com/vim/vim/commit/10d6f18b2f9090d19dd884827c4be59a20b446bf
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 4 15:54:38 2022 +0000
patch 8.2.3997: Vim9: not enough testing for extend() and map()
Problem: Vim9: not enough testing for extend() and map().
Solution: Add more test cases. Fix uncovered problems. Remove unused type
fields.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Jan 2022 17:00:04 +0100 |
parents | ccb9be1cdd71 |
children | 043a15b37bf1 |
comparison
equal
deleted
inserted
replaced
26936:6b6a26145714 | 26937:7045e9308ca3 |
---|---|
2277 || lhs.lhs_dest == dest_global | 2277 || lhs.lhs_dest == dest_global |
2278 || lhs.lhs_dest == dest_local)) | 2278 || lhs.lhs_dest == dest_local)) |
2279 // ":const var": lock the value, but not referenced variables | 2279 // ":const var": lock the value, but not referenced variables |
2280 generate_LOCKCONST(cctx); | 2280 generate_LOCKCONST(cctx); |
2281 | 2281 |
2282 if (is_decl | 2282 if ((lhs.lhs_type->tt_type == VAR_DICT |
2283 && (lhs.lhs_type->tt_type == VAR_DICT | |
2284 || lhs.lhs_type->tt_type == VAR_LIST) | 2283 || lhs.lhs_type->tt_type == VAR_LIST) |
2285 && lhs.lhs_type->tt_member != NULL | 2284 && lhs.lhs_type->tt_member != NULL |
2286 && lhs.lhs_type->tt_member != &t_unknown) | 2285 && lhs.lhs_type->tt_member != &t_unknown) |
2287 // Set the type in the list or dict, so that it can be checked, | 2286 // Set the type in the list or dict, so that it can be checked, |
2288 // also in legacy script. Not for "list<any> = val", then the | 2287 // also in legacy script. |
2289 // type of "val" is used. | |
2290 generate_SETTYPE(cctx, lhs.lhs_type); | 2288 generate_SETTYPE(cctx, lhs.lhs_type); |
2291 | 2289 |
2292 if (!skip_store && generate_store_lhs(cctx, &lhs, | 2290 if (!skip_store && generate_store_lhs(cctx, &lhs, |
2293 instr_count, is_decl) == FAIL) | 2291 instr_count, is_decl) == FAIL) |
2294 { | 2292 { |