bugGNU Octave - Bugs: bug #60087, field access in classes


bug #60087: field access in classes

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Sun 21 Feb 2021 04:26:29 PM UTC  
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Reissner Open/Closed:  Closed
Release:  6.1.0 Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 23 Feb 2021 06:31:30 PM UTC, comment #5: 

Octave 6.2.0 is a bug fix release for bugs found in Octave 6.1.0. Changes on the stable branch might be released in Octave 6.3.0 (if there will be another bug fix release).
So there is no way to fix this in 6.1.0.

I'm not certain if I understood the last few comments correctly. But I'll close this as fixed for now.
Please, comment back if this is not fixed, and we'll re-open.

Markus Mützel <mmuetzel>
Project Member
Tue 23 Feb 2021 09:57:40 AM UTC, comment #4: 

Markus, you were right, in 6.2.0 the bug disappeared again.
If you dont want to fix in 6.1.0 you can close the report.

Ernst Reissner <ernstreissner>
Tue 23 Feb 2021 08:35:40 AM UTC, comment #3: 

ok I checked 6.2.0.

It does not work either: octave:8> pn(2).jNum
error: invalid index for class
octave:9> fields(pn(2))
error: 'fields' undefined near line 1, column 1
octave:10> fieldnames(pn(2))
ans =
  [1,1] = jNum

Ernst Reissner <ernstreissner>
Mon 22 Feb 2021 07:21:15 PM UTC, comment #2: 

I am sorry, for the first failure I had to provide a bigger portion of my software.

I suggest you try whether



I wanted to check 6.2.0 but i could not build that revision.
I filed another report on that... i feel stressed. ;-)

Ernst Reissner <ernstreissner>
Sun 21 Feb 2021 05:29:46 PM UTC, comment #1: 

I cannot reproduce with the files you attached. I see the following error instead:

>> [pn(1) pn(2)];
error: 'ple' undefined near line 114, column 114
error: called from
    pn at line 114 column 15

Octave 6.2.0 has been released very recently. Can you still reproduce the error with that version?

Markus Mützel <mmuetzel>
Project Member
Sun 21 Feb 2021 04:26:29 PM UTC, original submission:  

I defined a class pn the constructor of which i attached below.
Still in 6.1.0 one can write

[pn(1) pn(2)];

In octave 5.2.0 one could write something like

double([pn(1) pn(2)])

which is no longer possible for 6.1.0.

error: can't perform indexing operations for class type
error: called from
    double at line 41 column 7

I am quite sure, that also


used to work but does no longer.

Note that i never defined subsref or subsasgn.

Ernst Reissner <ernstreissner>


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

Attach Files:

Attached Files
file #50900:  pn.m added by ernstreissner (6KiB - application/x-zerosize)
file #50901:  double.m added by ernstreissner (2KiB - application/x-zerosize)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by ernstreissner (Submitted the item)
  • -email is unavailable- added by ernstreissner

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-23 mmuetzel StatusNeed Info => Fixed
        Open/ClosedOpen => Closed
    2021-02-21 mmuetzel StatusNone => Need Info
    2021-02-21 ernstreissner Attached File- => Added pn.m, #50900
        Attached File- => Added double.m, #50901
        Carbon-Copy- => Added rei3ner@arcor.de

    Back to the top

    Powered by Savane 3.5