mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.0726: looping over list of lists works in script, not in function
Problem: Looping over list of lists and changing the list contents works in Vim9 script, not in a compiled function. Solution: Mark the loop variable final instead of const. (closes #11347)
This commit is contained in:
@@ -1048,7 +1048,7 @@ compile_for(char_u *arg_start, cctx_T *cctx)
|
||||
&& need_type_where(item_type, lhs_type, -1,
|
||||
where, cctx, FALSE, FALSE) == FAIL)
|
||||
goto failed;
|
||||
var_lvar = reserve_local(cctx, arg, varlen, ASSIGN_CONST,
|
||||
var_lvar = reserve_local(cctx, arg, varlen, ASSIGN_FINAL,
|
||||
lhs_type);
|
||||
if (var_lvar == NULL)
|
||||
// out of memory or used as an argument
|
||||
|
Reference in New Issue
Block a user