bugGNU Octave - Bugs: bug #59565, Oveloading size in a classdef file...

 
 

bug #59565: Oveloading size in a classdef file does not overload rows, columns, isvector etc

Submitter:  Luis Paulo Lima <luispauloml>
Submitted:  Sat 28 Nov 2020 03:56:39 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 5.2.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 29 Nov 2020 04:12:38 AM UTC, comment #1: 

This has been fixed in version 6.1 of Octave which was recently released.  Please download and use the new version.

Rik <rik5>
Group administrator
Sat 28 Nov 2020 03:56:39 AM UTC, original submission:  

When I write a new class in a `@` folder, if I use `classdef` and overload `size`, the results from `rows`, `columns`, `isvector`, `issquare` are wrong. Overloading `size` in a separate file but still keep using `classdef` does not solve the problem. If I use the older style of class definition, these functions work properly.

As a MWE to reproduce this, I created `@foo` (not using `classdef`) and `@baz` (using `classdef`) and attached them here. Although both have only one field, and the same implementation of `size`, I defined arbitrary values for each of them. These are their results:


octave:1> size(foo()), rows(foo()), columns(foo())
ans =

    5   29

ans =  5
ans =  29
octave:2> size(baz()), rows(baz()), columns(baz())
ans =

   17   32

ans =  1
ans =  1


I am running Octave 5.2.0 configured for "x86_64-w64-mingw32" on Windows 7.

Luis Paulo Lima <luispauloml>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #50356:  MWE_classes.tar added by luispauloml (8KiB - application/x-tar)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by luispauloml (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 group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-29 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2020-11-28 luispauloml Attached File- Added MWE_classes.tar, #50356

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code