0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.1.0925: Vim9: expression compiled when not necessary

Problem:  Vim9: expression compiled when not necessary
Solution: do not compile when ctx_skip is set, add a few more
          Vim9 expressions tests (Yegappan Lakshmanan)

closes: #16218

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan
2024-12-14 19:59:24 +01:00
committed by Christian Brabandt
parent 6cc3027e54
commit e203841e0d
4 changed files with 49 additions and 1 deletions

View File

@@ -3342,7 +3342,7 @@ compile_assignment(
// For "[var, var] = expr" drop the "expr" value.
// Also for "[var, var; _] = expr".
if (cac.cac_var_count > 0 &&
if (cctx->ctx_skip != SKIP_YES && cac.cac_var_count > 0 &&
(!cac.cac_semicolon || !cac.cac_did_generate_slice))
{
if (generate_instr_drop(cctx, ISN_DROP, 1) == NULL)