changeset 7960:22a18f206121

octave_class::subsasgn: only do internal magic if RHS is not an octave_class object
author John W. Eaton <jwe@octave.org>
date Mon, 21 Jul 2008 17:55:29 -0400
parents a73b80cd1f10
children a5d1e27ee1f4
files src/ChangeLog src/ov-class.cc
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Mon Jul 21 16:06:57 2008 -0400
+++ b/src/ChangeLog	Mon Jul 21 17:55:29 2008 -0400
@@ -1,5 +1,8 @@
 2008-07-21  John W. Eaton  <jwe@octave.org>
 
+	* ov-class.cc (octave_class::subsasgn): Only do internal magic if
+	rhs is not an octave_class object.
+
 	* OPERATORS/op-struct.cc: Define concatenation operators for
 	struct/matrix concatenation (valid if matrix is empty).
 	* OPERATORS/op-cell.cc (install_cell_ops): Likewise, for cells.
--- a/src/ov-class.cc	Mon Jul 21 16:06:57 2008 -0400
+++ b/src/ov-class.cc	Mon Jul 21 17:55:29 2008 -0400
@@ -319,7 +319,7 @@
 {
   octave_value retval;
 
-  if (in_class_method ())
+  if (in_class_method () && ! rhs.is_object ())
     {
       // FIXME -- this block of code is the same as the body of
       // octave_struct::subsasgn.  Maybe it could be shared instead of