mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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 #8627)
This commit is contained in:
@@ -6875,7 +6875,15 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
|
||||
if (compile_assign_lhs(var_start, &lhs, cmdidx,
|
||||
is_decl, heredoc, oplen, cctx) == FAIL)
|
||||
goto theend;
|
||||
if (!heredoc)
|
||||
if (heredoc)
|
||||
{
|
||||
SOURCING_LNUM = start_lnum;
|
||||
if (lhs.lhs_has_type
|
||||
&& need_type(&t_list_string, lhs.lhs_type,
|
||||
-1, 0, cctx, FALSE, FALSE) == FAIL)
|
||||
goto theend;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cctx->ctx_skip == SKIP_YES)
|
||||
{
|
||||
|
Reference in New Issue
Block a user