forked from aniani/vim
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:
@@ -817,6 +817,7 @@ ex_let(exarg_T *eap)
|
||||
else if (expr[0] == '=' && expr[1] == '<' && expr[2] == '<')
|
||||
{
|
||||
list_T *l;
|
||||
long cur_lnum = SOURCING_LNUM;
|
||||
|
||||
// HERE document
|
||||
l = heredoc_get(eap, expr + 3, FALSE);
|
||||
@@ -825,6 +826,8 @@ ex_let(exarg_T *eap)
|
||||
rettv_list_set(&rettv, l);
|
||||
if (!eap->skip)
|
||||
{
|
||||
// errors are for the assignment, not the end marker
|
||||
SOURCING_LNUM = cur_lnum;
|
||||
op[0] = '=';
|
||||
op[1] = NUL;
|
||||
(void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count,
|
||||
|
Reference in New Issue
Block a user