bugGNU Octave - Bugs: bug #44390, methods (object): Only displays...


bug #44390: methods (object): Only displays methods of subclass

Submitter:  Oliver Heimlich <oheim>
Submitted:  Sat 28 Feb 2015 09:32:26 PM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Oliver Heimlich Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 01 May 2018 07:45:00 AM UTC, comment #5: 

Further examples to test against are the 'symfun' class from the symbolic package, which inherits from the 'sym' class, and the 'tf' class in the control package, which inherts from the 'lti' class.

Mike Miller <mtmiller>
Group administrator
Mon 30 Mar 2015 03:43:13 PM UTC, comment #4: 

jsh, I can't confirm that ‘methods’ is broken at the dev branch. It works for the (built-in) ftp class as well as other @class'es (old style classes).

I have not tested it against classdef.

Oliver Heimlich <oheim>
Mon 30 Mar 2015 03:36:28 PM UTC, comment #3: 

I'm not sure that methods has been extended to classdef.  I think you can file a different bug report about that.  This bug is about displaying all methods when using the old style class syntax (@classname).

Rik <rik5>
Group administrator
Mon 30 Mar 2015 11:05:24 AM UTC, comment #2: 

There seems to be a few issues with the methods() function so I didn't open a new problem report but just reporting here.

For me in my latest build of the dev branch the methods function seems to completely broken. It doesn't work with either built-ins, classdef objects, or "string class names".

-X- <jsh>
Mon 02 Mar 2015 10:34:50 PM UTC, comment #1: 

Confirmed.  I changed the Item Group to "Matlab Compatibility".  According to the documentation

methods('classname') displays the names of the methods for the class classname. If classname is a MATLAB or Java class, then methods displays only public methods, including those methods inherited from superclasses.

So it is supposed to include superclasses.

Rik <rik5>
Group administrator
Sat 28 Feb 2015 09:32:26 PM UTC, original submission:  

Accoring to the documentation, methods (OBJ) should return “methods for the object OBJ”. When OBJ is an instance of class C and class C inherits class P, any methods from class P are ommitted in the output unless they are overriden in class C.

Expected result: methods (OBJ) returns a union of methods from classes C and P.

Example (use 3.8.2 or dev branch): With the interval package you can call “methods (infsupdec)”. The method “sup” from the base class infsup is missing. The overridden method “round” is present.

Either the result should be fixed or the documentation should clarify that methods (OBJ) actually returns methods from the class and not all methods for the object.

Oliver Heimlich <oheim>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jsh (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by oheim (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-01 mtmiller Release3.8.2 dev
    2015-03-02 rik5 Item GroupIncorrect Result Matlab Compatibility
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.12