Mercurial > octave
changeset 29207:dd0ad2409ef7 stable
Improve class_simple function handle function lookup (bug #59661).
* ov-fcn-handle.cc (class_simple_fcn_handle::function_value): Search for
function using name.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 20 Dec 2020 18:37:31 +0100 |
parents | 21dddfdaa636 |
children | 370b5ded5e6a |
files | libinterp/octave-value/ov-fcn-handle.cc |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-fcn-handle.cc Fri Dec 18 21:47:18 2020 +0100 +++ b/libinterp/octave-value/ov-fcn-handle.cc Sun Dec 20 18:37:31 2020 +0100 @@ -449,7 +449,11 @@ // Cache this value so that the pointer will be valid as long as the // function handle object is valid. - m_fcn = symtab.find_method (m_name, m_dispatch_class); + // FIXME: This should probably dispatch to the respective class method. + // But that breaks if a function handle is used in a class method with + // e.g. bsxfun with arguments of a different class (see bug #59661). + // m_fcn = symtab.find_method (m_name, m_dispatch_class); + m_fcn = symtab.find_function (m_name, octave_value_list ()); return m_fcn.is_defined () ? m_fcn.function_value () : nullptr; }