comparison src/vim9compile.c @ 25405:747ebbce2421 v8.2.3239

patch 8.2.3239: Vim9: no error using heredoc for a number variable Commit: https://github.com/vim/vim/commit/81530e36033dec2c2cd94af6dd48ceb0389e95a2 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 28 21:25:49 2021 +0200 patch 8.2.3239: Vim9: no error using heredoc for a number variable Problem: Vim9: no error using heredoc for a number variable. Solution: Add a type check. (closes https://github.com/vim/vim/issues/8627)
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Jul 2021 21:30:04 +0200
parents 9203b28ab453
children 21b70bab366c
comparison
equal deleted inserted replaced
25404:d713f6697450 25405:747ebbce2421
6873 * Figure out the LHS type and other properties. 6873 * Figure out the LHS type and other properties.
6874 */ 6874 */
6875 if (compile_assign_lhs(var_start, &lhs, cmdidx, 6875 if (compile_assign_lhs(var_start, &lhs, cmdidx,
6876 is_decl, heredoc, oplen, cctx) == FAIL) 6876 is_decl, heredoc, oplen, cctx) == FAIL)
6877 goto theend; 6877 goto theend;
6878 if (!heredoc) 6878 if (heredoc)
6879 {
6880 SOURCING_LNUM = start_lnum;
6881 if (lhs.lhs_has_type
6882 && need_type(&t_list_string, lhs.lhs_type,
6883 -1, 0, cctx, FALSE, FALSE) == FAIL)
6884 goto theend;
6885 }
6886 else
6879 { 6887 {
6880 if (cctx->ctx_skip == SKIP_YES) 6888 if (cctx->ctx_skip == SKIP_YES)
6881 { 6889 {
6882 if (oplen > 0 && var_count == 0) 6890 if (oplen > 0 && var_count == 0)
6883 { 6891 {