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

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

[Octave-bug-tracker] [bug #59565] Oveloading size in a classdef file doe


From: Luis Paulo Lima
Subject: [Octave-bug-tracker] [bug #59565] Oveloading size in a classdef file does not overload rows, columns, isvector etc
Date: Fri, 27 Nov 2020 22:56:41 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.172 Safari/537.36 Vivaldi/2.5.1525.48

URL:
  <https://savannah.gnu.org/bugs/?59565>

                 Summary: Oveloading size in a classdef file does not overload
rows, columns, isvector etc
                 Project: GNU Octave
            Submitted by: luispauloml
            Submitted on: Sat 28 Nov 2020 03:56:39 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 28 Nov 2020 03:56:39 AM UTC  Name: MWE_classes.tar  Size: 8KiB   By:
luispauloml

<http://savannah.gnu.org/bugs/download.php?file_id=50356>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59565>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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