Problem: Crash when using function reference. (Luchr)
Solution: Set initial refcount. (Ken Takata, closes #690)
/* Turn "dict.Func" into a partial for "Func" with "dict". */
if (pt != NULL)
{
+ pt->pt_refcount = 1;
pt->pt_dict = selfdict;
selfdict = NULL;
pt->pt_name = rettv->vval.v_string;
call assert_fails('call function(dict.MyFunc, ["bbb"], dict)', 'E924:')
endfunc
+
+fun InnerCall(funcref)
+ return a:funcref
+endfu
+
+fun OuterCall()
+ let opt = { 'func' : function('sin') }
+ call InnerCall(opt.func)
+endfu
+
+func Test_function_in_dict()
+ call OuterCall()
+endfunc
+
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1580,
/**/
1579,
/**/