Mercurial > octave-nkf
diff libinterp/corefcn/oct-lvalue.h @ 20283:011a364b4d78
improve compatibility of indexed assignment (bug #43813)
* oct-lvalue.h, oct-lvalue.cc (octave_lvalue::index_type,
octave_lvalue::index_is_empty): New functions.
* pt-assign.cc (tree_multi_assignment::rvalue): For expressions like
[lhs{:}] = fcn (args) with LHS undefined, and in which FCN produces an
output given nargout equal to zero, convert LHS to a one-element cell
array indexed by 1.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 05 Jun 2015 15:51:04 -0400 |
parents | 4197fc428c7d |
children |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-lvalue.h Wed Jun 03 14:16:43 2015 -0700 +++ b/libinterp/corefcn/oct-lvalue.h Fri Jun 05 15:51:04 2015 -0400 @@ -90,6 +90,10 @@ void clear_index (void) { type = std::string (); idx.clear (); } + std::string index_type (void) const { return type; } + + bool index_is_empty (void) const; + void do_unary_op (octave_value::unary_op op); octave_value value (void) const;