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

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

[Octave-bug-tracker] [bug #42735] subclass inheritence: symbol ops (e.g.


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #42735] subclass inheritence: symbol ops (e.g., plus, mtimes) do not respect superiorto
Date: Sat, 17 Dec 2016 20:34:06 -0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0

Update of bug #42735 (project octave):

                  Status:                    None => Confirmed              
        Operating System:               GNU/Linux => Any                    

    _______________________________________________________

Follow-up Comment #3:

The cause of this behavior is right here


    std::string dispatch_type
      = a1.is_object () ? a1.class_name () : a2.class_name ();


http://hg.savannah.gnu.org/hgweb/octave/file/b5407b1ab11a/libinterp/operators/op-class.cc#l81

When a binary operator is called with one or two class arguments, the class
type of the left hand argument takes precedence. There should be additional
checking if they are both class types.

Can you test what Matlab does in this case if the two classes are completely
unrelated (no inheritance, no superiorto declaration, just two classes that
both provide plus methods)?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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