view test/bug-51599/class_bug51599.m @ 30920:47cbc69e66cd

eliminate direct access to call stack from evaluator The call stack is an internal implementation detail of the evaluator. Direct access to it outside of the evlauator should not be needed. * pt-eval.h (tree_evaluator::get_call_stack): Delete.
author John W. Eaton <jwe@octave.org>
date Fri, 08 Apr 2022 15:19:22 -0400
parents 3ac5d3d01cad
children
line wrap: on
line source

classdef class_bug51599 < handle
  properties
    anon_fcn
  endproperties
  methods
    function foo (obj)
      obj.anon_fcn = @(x) my_helper (x + 1);
    endfunction
    function ret = bar (obj, val)
      ret = obj.anon_fcn (val);
    endfunction
  endmethods
endclassdef

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