Patch 8.1.2412
Problem: Crash when evaluating expression with error. (Dhiraj Mishra)
Solution: Check parsing failed. (closes #5329)
Files: src/eval.c, src/testdir/test_lambda.vim
*** ../vim-8.1.2411/src/eval.c 2019-12-01 21:11:18.433245377 +0100
--- src/eval.c 2019-12-08 18:34:52.203591055 +0100
***************
*** 2902,2908 ****
rettv->v_type = VAR_UNKNOWN;
ret = get_lambda_tv(arg, rettv, evaluate);
! if (ret == NOTDONE)
return FAIL;
else if (**arg != '(')
{
--- 2902,2908 ----
rettv->v_type = VAR_UNKNOWN;
ret = get_lambda_tv(arg, rettv, evaluate);
! if (ret != OK)
return FAIL;
else if (**arg != '(')
{
*** ../vim-8.1.2411/src/testdir/test_lambda.vim 2019-07-24 13:08:26.111204138
+0200
--- src/testdir/test_lambda.vim 2019-12-08 18:34:22.175696927 +0100
***************
*** 302,304 ****
--- 302,309 ----
let Extract = {-> function(List, ['foobar'])()[0]}
call assert_equal('foobar', Extract())
endfunc
+
+ func Test_lambda_error()
+ " This was causing a crash
+ call assert_fails('ec{@{->{d->()()', 'E15')
+ endfunc
*** ../vim-8.1.2411/src/version.c 2019-12-08 17:08:24.409686392 +0100
--- src/version.c 2019-12-08 18:18:02.779060642 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 2412,
/**/
--
hundred-and-one symptoms of being an internet addict:
228. You spend Saturday night making the counter on your home page
pass that 2000 mark.
/// 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/201912081742.xB8HgS41025568%40masaka.moolenaar.net.