To: vim_dev@googlegroups.com Subject: Patch 8.2.4972 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4972 Problem: Vim9: compilation fails when using dict member when skipping. Solution: Do not generate ISN_USEDICT when skipping. (closes #10433) Files: src/vim9expr.c, src/testdir/test_vim9_expr.vim *** ../vim-8.2.4971/src/vim9expr.c 2022-05-13 16:23:33.793284093 +0100 --- src/vim9expr.c 2022-05-17 15:02:14.538628062 +0100 *************** *** 2102,2108 **** // Turn "dict.Func" into a partial for "Func" bound to "dict". // This needs to be done at runtime to be able to check the type. ! if (keeping_dict && generate_instr(cctx, ISN_USEDICT) == NULL) return FAIL; return OK; --- 2102,2109 ---- // Turn "dict.Func" into a partial for "Func" bound to "dict". // This needs to be done at runtime to be able to check the type. ! if (keeping_dict && cctx->ctx_skip != SKIP_YES ! && generate_instr(cctx, ISN_USEDICT) == NULL) return FAIL; return OK; *** ../vim-8.2.4971/src/testdir/test_vim9_expr.vim 2022-05-17 13:14:19.800706270 +0100 --- src/testdir/test_vim9_expr.vim 2022-05-17 15:00:54.946638840 +0100 *************** *** 452,457 **** --- 452,463 ---- g:vals = [] assert_equal(false, g:Record(1) && g:Record(true) && g:Record(0)) assert_equal([1, true, 0], g:vals) + + var failed = false + if false && g:a == g:b.c + failed = true + endif + assert_false(failed) END v9.CheckDefAndScriptSuccess(lines) enddef *** ../vim-8.2.4971/src/version.c 2022-05-17 13:14:19.800706270 +0100 --- src/version.c 2022-05-17 14:59:05.646637042 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4972, /**/ -- Your fault: core dumped /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///