classdef local_classdef_anon_fcn < handle
  properties
    anon_fcn;
  end
  methods
    function foo (self)
      self.anon_fcn = @(x) my_helper(x+1);
    end
    function ret = bar (self, val)
      ret = self.anon_fcn (val);
    end
  end
end


function ret = my_helper (val)
  ret = val + 1;
end


%% Check if function handle can be called
%!test
%! a = local_classdef_anon_fcn;
%! a.foo
%! assert (a.bar (0), 2) 
