[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: |
Fri, 11 Jul 2014 23:08:53 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 |
URL:
<http://savannah.gnu.org/bugs/?42735>
Summary: subclass inheritence: symbol ops (e.g., plus,
mtimes) do not respect superiorto
Project: GNU Octave
Submitted by: cbm
Submitted on: Fri 11 Jul 2014 11:08:52 PM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
I have a class called parent and a class called child.
Say P is instance of parent and C is instance of child.
parent and child have "myplus" and "plus" methods.
1) P+C and C+P call different plus methods, independent of whether
superiotor('parent') is set. This behaviour DOES NOT match matlab.
2) plus(P,C) and plus(C,P) call the child plus method if superiorto is set,
otherwise different methods. This behaviour matches matlab 2008a.
3) myplus(P,C) and myplus(C,P) call the child myplus method if superiorto is
set, otherwise different methods. This behaviour matches matlab 2008a.
Tested with plus, minus, mtimes. Tested on 3.8.1 and "hg - 1 month".
(personally, I don't see why I'd ever want the behaviour w/o superiorto, but
that is not the bug here)
I'll attach my minimal example: untar and run mytest.m
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 11 Jul 2014 11:08:52 PM GMT Name: inheritance.tar Size: 20kB By:
cbm
<http://savannah.gnu.org/bugs/download.php?file_id=31704>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42735>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42735] subclass inheritence: symbol ops (e.g., plus, mtimes) do not respect superiorto,
Colin Macdonald <=