bugGNU Octave - Bugs: bug #44844, indexed field assignment in...

 
 

bug #44844: indexed field assignment in constructor converts legacy nested class object to struct

Submitted by:  Carlo de Falco <cdf>
Submitted on:  Wed 15 Apr 2015 09:49:01 AM UTC  
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Rafael Vazquez Open/Closed:  Open
Release:  dev 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 22 Aug 2017 07:33:58 PM UTC, comment #3:

This has something to do specifically with either the nested definition of one object inside another, or with the indexing operation that is done inside the constructor, or the combination of both.

If I trivially rewrite the constructor to avoid nested indexing and assignments together like this:

then it works correctly as in Matlab.

The error only happens because of the assignment

I'm unable to convert this class example to classdef, so I have to assume this affects legacy classes for now, until someone can show an example that also affects classdef.

Mike Miller <mtmiller>
Project Administrator
Tue 29 Nov 2016 02:43:46 PM UTC, comment #2:

The issue still appears in 4.3.0+

Carlo de Falco <cdf>
Project Member
Tue 28 Jun 2016 09:33:06 AM UTC, comment #1:

Same issue still appears in Octave 4.1+

Carlo de Falco <cdf>
Project Member
Wed 15 Apr 2015 09:49:01 AM UTC, original submission:

Using the definitions of classes prova and prova2 in the aasignment

In Octave 3.8.2:

in Matlab R2007b

Carlo de Falco <cdf>
Project Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #33680:  class-files.tar.gz added by cdf (711B - application/x-gzip)

 

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 cdf (Submitted the item)
  • -email is unavailable- added by cdf
  •  

    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
    2017-08-22 mtmiller Item GroupIncorrect Result => Matlab Compatibility
        StatusNone => Confirmed
        Summaryfield assignment converts class object to struct => indexed field assignment in constructor converts legacy nested class object to struct
    2016-06-28 cdf Release3.8.2 => dev
    2015-04-15 cdf Attached File- => Added class-files.tar.gz, #33680
        Carbon-Copy- => Added -email is unavailable-

    Back to the top


    Powered by Savane 3.3