Mirror of the Vim source from https://github.com/vim/vim
Revisão | 2644e49d51471e8f264e02d3af2a423396243cba (tree) |
---|---|
Hora | 2022-05-17 23:15:02 |
Autor | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
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
@@ -452,6 +452,12 @@ | ||
452 | 452 | g:vals = [] |
453 | 453 | assert_equal(false, g:Record(1) && g:Record(true) && g:Record(0)) |
454 | 454 | 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) | |
455 | 461 | END |
456 | 462 | v9.CheckDefAndScriptSuccess(lines) |
457 | 463 | enddef |
@@ -747,6 +747,8 @@ | ||
747 | 747 | static int included_patches[] = |
748 | 748 | { /* Add new patch number below this line */ |
749 | 749 | /**/ |
750 | + 4972, | |
751 | +/**/ | |
750 | 752 | 4971, |
751 | 753 | /**/ |
752 | 754 | 4970, |
@@ -2102,7 +2102,8 @@ | ||
2102 | 2102 | |
2103 | 2103 | // Turn "dict.Func" into a partial for "Func" bound to "dict". |
2104 | 2104 | // 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) | |
2106 | 2107 | return FAIL; |
2107 | 2108 | |
2108 | 2109 | return OK; |