Mercurial > hg > octave-nkf
changeset 9693:1c19877799d3
improve error reports for computed assignment
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 05 Oct 2009 11:53:41 +0200 |
parents | 126b49caba0d |
children | 50db3c5175b5 |
files | src/ChangeLog src/ov.cc |
diffstat | 2 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2009-10-05 Jaroslav Hajek <highegg@gmail.com> + + * ov.cc (octave_value::assign): Do not gripe "assignment failed" if + already griped about the binary operation. + 2009-10-05 Jaroslav Hajek <highegg@gmail.com> * pt-idx.cc (tree_index_expression::rvalue): When evaluating index
--- a/src/ov.cc +++ b/src/ov.cc @@ -1279,12 +1279,12 @@ } else retval = subsasgn (type, idx, t_rhs); + + if (error_state) + gripe_assign_failed_or_no_method (assign_op_as_string (op_asn_eq), + type_name (), rhs.type_name ()); } - if (error_state) - gripe_assign_failed_or_no_method (assign_op_as_string (op), - type_name (), rhs.type_name ()); - return retval; } @@ -1332,10 +1332,6 @@ operator = (t); } } - - if (error_state) - gripe_assign_failed_or_no_method (assign_op_as_string (op), - type_name (), rhs.type_name ()); } return *this;