mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
patch 8.2.1272: Vim9: type not checked if declaration also assigns value
Problem: Vim9: type not checked if declaration also assigns value. Solution: Check the type. (issue #6507)
This commit is contained in:
@@ -1270,7 +1270,12 @@ set_var_lval(
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lp->ll_type != NULL
|
||||
&& check_typval_type(lp->ll_type, rettv) == FAIL)
|
||||
return;
|
||||
set_var_const(lp->ll_name, lp->ll_type, rettv, copy, flags);
|
||||
}
|
||||
*endp = cc;
|
||||
}
|
||||
else if (var_check_lock(lp->ll_newkey == NULL
|
||||
|
||||
Reference in New Issue
Block a user