octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44643] classdef handle object can go into an


From: jsh
Subject: [Octave-bug-tracker] [bug #44643] classdef handle object can go into an recursive loop with isequal(obj, obj)
Date: Fri, 27 Mar 2015 07:50:46 +0000
User-agent: Opera/9.80 (X11; Linux x86_64; Edition Linux Mint) Presto/2.12.388 Version/12.16

URL:
  <http://savannah.gnu.org/bugs/?44643>

                 Summary: classdef handle object can go into an recursive loop
with isequal(obj,obj)
                 Project: GNU Octave
            Submitted by: jsh
            Submitted on: Fri 27 Mar 2015 07:50:45 AM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0-rc2
        Operating System: Any

    _______________________________________________________

Details:

When using a handle class object with properties that define child/parent
relations isequal comparison goes into a recursive loop when comparing an
instance with itself. For example, define the class foo:


classdef foo < handle
  properties
    child
    parent
  end
end


And create two instances one child and one parent:


a = foo();
b = foo();
a.parent = b;
b.child  = a;

isequal(a,b)

isequal(a,a)


isequal(a,b) works fine and returns zero while isequal(a,a) or isequal(b,b)
goes into a recursive loop (unlike Matlab which returns 1).




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44643>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]