Problem: Crash when evaluating expression with error. (Dhiraj Mishra)
Solution: Check parsing failed. (closes #5329)
rettv->v_type = VAR_UNKNOWN;
ret = get_lambda_tv(arg, rettv, evaluate);
- if (ret == NOTDONE)
+ if (ret != OK)
return FAIL;
else if (**arg != '(')
{
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2412,
/**/
2411,
/**/