]> granicus.if.org Git - vim/commitdiff
patch 9.0.0503: build failure v9.0.0503
authorBram Moolenaar <Bram@vim.org>
Mon, 19 Sep 2022 15:02:43 +0000 (16:02 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 19 Sep 2022 15:02:43 +0000 (16:02 +0100)
Problem:    Build failure.
Solution:   Add missing changes.

src/version.c
src/vim9compile.c

index 7e22f01133fc80e8c45ec188a522a7fff87f59f8..6bd68dc36aaf44d86a2a10c730c6803bd5324c81 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    503,
 /**/
     502,
 /**/
index 4890de34610e7d5f8bfe6f3ce7ab518b61ceb288..74ba88fda87fc717bf0bca12c13819473b776ced 100644 (file)
@@ -54,7 +54,9 @@ lookup_local(char_u *name, size_t len, lvar_T *lvar, cctx_T *cctx)
            {
                *lvar = *lvp;
                lvar->lv_from_outer = 0;
-               lvar->lv_loop_idx = get_loop_var_idx(cctx);
+               // If the variable was declared inside a loop set
+               // lvar->lv_loop_idx and lvar->lv_loop_depth.
+               get_loop_var_idx(cctx, idx, lvar);
            }
            return OK;
        }
@@ -955,8 +957,7 @@ compile_nested_function(exarg_T *eap, cctx_T *cctx, garray_T *lines_to_free)
     // recursive call.
     if (is_global)
     {
-       // TODO: loop variable index and count
-       r = generate_NEWFUNC(cctx, lambda_name, func_name, 0, 0);
+       r = generate_NEWFUNC(cctx, lambda_name, func_name);
        func_name = NULL;
        lambda_name = NULL;
     }
@@ -1195,7 +1196,7 @@ generate_loadvar(
            {
                if (lvar->lv_from_outer > 0)
                    generate_LOADOUTER(cctx, lvar->lv_idx, lvar->lv_from_outer,
-                                                     lvar->lv_loop_idx, type);
+                                lvar->lv_loop_depth, lvar->lv_loop_idx, type);
                else
                    generate_LOAD(cctx, ISN_LOAD, lvar->lv_idx, NULL, type);
            }