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: Colin Macdonald
Subject: [Octave-bug-tracker] [bug #42735] subclass inheritence: symbol ops (e.g., plus, mtimes) do not respect superiorto
Date: Thu, 19 Jan 2017 05:15:44 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #6, bug #42735 (project octave):

Aha, yes "InteriorClasses" is key.  Now D is defined as "classdef
(InferiorClasses = {?A}) D < A"

Matlab

>> a = A(10); b = B(20); c = C(30); d = D(40);
>> a + d         %% note
called D::plus

ans =

       40010

>> d + a
called D::plus

ans =

       10040


Octave:

octave:1> a = A(10); b = B(20); c = C(30); d = D(40);
octave:2> a + d     %% oh no
called A::plus
ans =  60
octave:3> d + a
called D::plus
ans =  10040
octave:4> 



(file #39509)
    _______________________________________________________

Additional Item Attachment:

File name: D.m                            Size:0 KB


    _______________________________________________________

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]