diff libinterp/octave-value/ov-classdef.h @ 18450:6e3344111522

Implement subsasgn overloading in classdef * ov-classdef.cc (octave_classdef::subsasgn): Look for overloaded method "subsasgn" when not in a class method or a builtin call. * ov-classdef.h (to_cdef, to_cdef_ref): Turn warning into error when the casted object is not of type "object".
author Michael Goffioul <michael.goffioul@gmail.com>
date Fri, 24 Jan 2014 22:17:29 -0500
parents 122239398a03
children 954bf42180d3
line wrap: on
line diff
--- a/libinterp/octave-value/ov-classdef.h
+++ b/libinterp/octave-value/ov-classdef.h
@@ -1500,7 +1500,7 @@
     return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object ();
   else
     {
-      warning ("trying to cast non-object into object");
+      error ("cannot convert `%s' into `object'", val.type_name().c_str ());
       return cdef_object ();
     }
 }
@@ -1514,7 +1514,7 @@
     return dynamic_cast<octave_classdef *> (val.internal_rep ())->get_object_ref ();
   else
     {
-      warning ("trying to cast non-object into object");
+      error ("cannot convert `%s' into `object'", val.type_name().c_str ());
       return empty;
     }
 }