• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisão2644e49d51471e8f264e02d3af2a423396243cba (tree)
Hora2022-05-17 23:15:02
AutorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Mensagem de Log

patch 8.2.4972: Vim9: compilation fails when using dict member when skipping

Commit: https://github.com/vim/vim/commit/1ff9c44267ce487145d22d75a96370d7f96ae8dd
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 17 15:03:33 2022 +0100

patch 8.2.4972: Vim9: compilation fails when using dict member when skipping
Problem: Vim9: compilation fails when using dict member when skipping.
Solution: Do not generate ISN_USEDICT when skipping. (closes https://github.com/vim/vim/issues/10433)

Mudança Sumário

Diff

diff -r 61a6cd224f07 -r 2644e49d5147 src/testdir/test_vim9_expr.vim
--- a/src/testdir/test_vim9_expr.vim Tue May 17 14:15:03 2022 +0200
+++ b/src/testdir/test_vim9_expr.vim Tue May 17 16:15:02 2022 +0200
@@ -452,6 +452,12 @@
452452 g:vals = []
453453 assert_equal(false, g:Record(1) && g:Record(true) && g:Record(0))
454454 assert_equal([1, true, 0], g:vals)
455+
456+ var failed = false
457+ if false && g:a == g:b.c
458+ failed = true
459+ endif
460+ assert_false(failed)
455461 END
456462 v9.CheckDefAndScriptSuccess(lines)
457463 enddef
diff -r 61a6cd224f07 -r 2644e49d5147 src/version.c
--- a/src/version.c Tue May 17 14:15:03 2022 +0200
+++ b/src/version.c Tue May 17 16:15:02 2022 +0200
@@ -747,6 +747,8 @@
747747 static int included_patches[] =
748748 { /* Add new patch number below this line */
749749 /**/
750+ 4972,
751+/**/
750752 4971,
751753 /**/
752754 4970,
diff -r 61a6cd224f07 -r 2644e49d5147 src/vim9expr.c
--- a/src/vim9expr.c Tue May 17 14:15:03 2022 +0200
+++ b/src/vim9expr.c Tue May 17 16:15:02 2022 +0200
@@ -2102,7 +2102,8 @@
21022102
21032103 // Turn "dict.Func" into a partial for "Func" bound to "dict".
21042104 // This needs to be done at runtime to be able to check the type.
2105- if (keeping_dict && generate_instr(cctx, ISN_USEDICT) == NULL)
2105+ if (keeping_dict && cctx->ctx_skip != SKIP_YES
2106+ && generate_instr(cctx, ISN_USEDICT) == NULL)
21062107 return FAIL;
21072108
21082109 return OK;
Show on old repository browser