comparison src/vim9compile.c @ 24085:23c692a4bc36 v8.2.2584

patch 8.2.2584: Vim9: type error for assigning "any" to a list Commit: https://github.com/vim/vim/commit/d345fb921678613ffc66a8afc82bc0e815c72312 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 10 18:43:09 2021 +0100 patch 8.2.2584: Vim9: type error for assigning "any" to a list Problem: Vim9: type error for assigning the result of list concatenation to a list. Solution: Do not consider concatenation result in a constant. (closes #7942)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Mar 2021 18:45:04 +0100
parents 780dec2ffa6b
children 92139c21cdfd
comparison
equal deleted inserted replaced
24084:3865ddb3834a 24085:23c692a4bc36
4448 4448
4449 return OK; 4449 return OK;
4450 } 4450 }
4451 4451
4452 /* 4452 /*
4453 * + number addition 4453 * + number addition or list/blobl concatenation
4454 * - number subtraction 4454 * - number subtraction
4455 * .. string concatenation 4455 * .. string concatenation
4456 */ 4456 */
4457 static int 4457 static int
4458 compile_expr5(char_u **arg, cctx_T *cctx, ppconst_T *ppconst) 4458 compile_expr5(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
4530 --ppconst->pp_used; 4530 --ppconst->pp_used;
4531 } 4531 }
4532 else 4532 else
4533 { 4533 {
4534 generate_ppconst(cctx, ppconst); 4534 generate_ppconst(cctx, ppconst);
4535 ppconst->pp_is_const = FALSE;
4535 if (*op == '.') 4536 if (*op == '.')
4536 { 4537 {
4537 if (may_generate_2STRING(-2, cctx) == FAIL 4538 if (may_generate_2STRING(-2, cctx) == FAIL
4538 || may_generate_2STRING(-1, cctx) == FAIL) 4539 || may_generate_2STRING(-1, cctx) == FAIL)
4539 return FAIL; 4540 return FAIL;