Patch 8.2.0732
Problem: Vim9: storing value in dict messes up stack.
Solution: Correct item count of stack.
Files: src/vim9execute.c, src/testdir/test_vim9_cmd.vim
*** ../vim-8.2.0731/src/vim9execute.c 2020-05-10 19:10:27.968996544 +0200
--- src/vim9execute.c 2020-05-10 21:46:42.504818732 +0200
***************
*** 1286,1291 ****
--- 1286,1292 ----
}
clear_tv(tv_idx);
clear_tv(tv_list);
+ ectx.ec_stack.ga_len -= 3;
}
break;
***************
*** 1319,1324 ****
--- 1320,1326 ----
}
clear_tv(tv_key);
clear_tv(tv_dict);
+ ectx.ec_stack.ga_len -= 3;
}
break;
*** ../vim-8.2.0731/src/testdir/test_vim9_cmd.vim 2020-05-10
19:10:27.968996544 +0200
--- src/testdir/test_vim9_cmd.vim 2020-05-10 21:46:28.356869046 +0200
***************
*** 54,59 ****
--- 54,65 ----
assert_equal('asdf', l[1])
assert_equal('asdf', l[-1])
assert_equal('value', l[-2])
+
+ let nrl: list<number> = []
+ for i in range(5)
+ nrl[i] = i
+ endfor
+ assert_equal([0, 1, 2, 3, 4], nrl)
enddef
def Test_assign_dict()
***************
*** 64,69 ****
--- 70,81 ----
d[123] = 'qwerty'
assert_equal('qwerty', d[123])
assert_equal('qwerty', d['123'])
+
+ let nrd: dict<number> = {}
+ for i in range(3)
+ nrd[i] = i
+ endfor
+ assert_equal({'0': 0, '1': 1, '2': 2}, nrd)
enddef
*** ../vim-8.2.0731/src/version.c 2020-05-10 21:20:25.614465563 +0200
--- src/version.c 2020-05-10 21:47:33.384637833 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 732,
/**/
--
>From "know your smileys":
:-) Funny
|-) Funny Oriental
(-: Funny Australian
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202005101948.04AJm9D5027960%40masaka.moolenaar.net.