Mercurial > octave
diff libinterp/parse-tree/pt-eval.cc @ 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 | e760fef2829c |
children | b8ab8b58547d 286fe9352cd6 |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc Mon Jun 15 13:35:54 2020 -0700 +++ b/libinterp/parse-tree/pt-eval.cc Mon Jun 15 16:43:09 2020 -0400 @@ -1186,11 +1186,11 @@ if (fcn->is_class_method ()) { - // Create CLASSSIMPLE handle to method. + // Create CLASSSIMPLE handle to method but don't + // bind to the method. Lookup will be done later. octave_fcn_handle *fh - = new octave_fcn_handle (ov_meth, dispatch_class, - fcn_name); + = new octave_fcn_handle (dispatch_class, fcn_name); return octave_value (fh); }