changeset 28553:eae3b1e3c6c4

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Fri, 10 Jul 2020 00:56:22 -0400
parents c89e1b6573e7 (current diff) aa47120a505d (diff)
children 24f43782e04c
files
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-idx.cc	Fri Jul 10 11:40:20 2020 +0900
+++ b/libinterp/parse-tree/pt-idx.cc	Fri Jul 10 00:56:22 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 ();