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: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Rafael VazquezOpen/Closed: Open
Release: devOperating 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 File(s):
   
   
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
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by cdf (Submitted the item)
  • -unavailable- added by cdf
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Aug 2017 07:33:58 PM UTCmtmillerItem 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
    Tue 28 Jun 2016 09:33:06 AM UTCcdfRelease3.8.2=>dev
    Wed 15 Apr 2015 09:49:01 AM UTCcdfAttached File-=>Added class-files.tar.gz, #33680
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1