view test/bug-58572/bug58572.m @ 28481:1be719d8b375 stable

fix dispatch error with classsimple function handle (bug #58572) * test/bug-58572/bug-58572.tst, test/bug-58572/bug58572.m, test/bug-58572/module.mk: New test files. * test/module.mk: Update. * ov-fcn-handle.h, ov-fcn-handle.cc (class_simple_fcn_handle): Don't use default arguments for constructor that accepts three string arguments. New constuctor that accepts class name and method name without a function object. (class_simple_fcn_handle::call): Use name and arguments for lookup if m_fcn is not defined. * pt-eval.cc (tree_evaluator::make_fcn_handle): Don't bind to class method when creating classsimple handle.
author John W. Eaton <jwe@octave.org>
date Mon, 15 Jun 2020 16:43:09 -0400
parents
children
line wrap: on
line source

classdef bug58572
  methods
    function rslt = use_num (obj)
      rslt = cellfun (@isnumeric, {'a_name'});
    endfunction
    function rslt = isnumeric (obj)
      if (! isa (obj, 'bug58572'))
        error ('bug58572.isnumeric called without object!');
      endif
      rslt = true;
    endfunction
  endmethods
endclassdef