Mercurial > octave
changeset 28552:aa47120a505d stable
set correct info for isargout when evaluating index expr args (bug #58727)
* pt-idx.cc (make_lvalue_list): Temporarily set the current
lvalue_list in the evaluator to nullptr while evaluating arguments.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 10 Jul 2020 00:31:10 -0400 |
parents | f00e92f9e85b |
children | eae3b1e3c6c4 7a17dfa7716d |
files | libinterp/parse-tree/pt-idx.cc |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.cc Fri Jul 10 11:39:06 2020 +0900 +++ b/libinterp/parse-tree/pt-idx.cc Fri Jul 10 00:31:10 2020 -0400 @@ -153,10 +153,20 @@ const string_vector& m_arg_nm, const octave_value *object, bool rvalue = true) { + // FIXME: This function duplicates tree_evaluator::make_value_list. + // See also the way convert_to_const_vector is used in + // tree_index_expression::evaluate_n. + octave_value_list retval; if (m_args) { + unwind_action act ([&tw] (const std::list<octave_lvalue> *lvl) + { + tw.set_lvalue_list (lvl); + }, tw.lvalue_list ()); + tw.set_lvalue_list (nullptr); + if (rvalue && object && m_args->has_magic_end () && object->is_undefined ()) err_invalid_inquiry_subscript ();