bugGNU Octave - Bugs: bug #52614, setting properties of classdef...

 
 

bug #52614: setting properties of classdef object during construction with inheritance

Submitted by:  Amro <amro_octave>
Submitted on:  Thu 07 Dec 2017 03:56:19 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 4Item Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Open/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.

 

Wed 27 Dec 2017 08:36:23 PM UTC, comment #1:

Confirmed. This issue is still present on the development branch. I have changed the category to Matlab Compatibility.

I lowered the priority by 1 since there is a workaround.

Rik <rik5>
Project Administrator
Thu 07 Dec 2017 03:56:19 PM UTC, original submission:

I have a simple class hierarchy with two classes:

  • In the base class, the constructor calls a method which initializes some properties.
  • In the derived class, I override said method (while still calling the parent method). The constructor also invokes the parent constructor.

Here is a minimal example:

$ cat ClassA.m

$ cat ClassB.m

This works fine in MATLAB (I'm using R2017a):

But it fails in Octave 4.2.1:

I did try to incorporate the functionality of the foo method into the constructor (i.e directly set the properties a and b from the respective constructors), and the code does work then (both MATLAB and Octave):

$ cat ClassAA.m ClassBB.m

Still, I wanted to report this case... Thanks.

Amro <amro_octave>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by amro_octave (Submitted the item)
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 27 Dec 2017 08:36:39 PM UTCrik5Carbon-CopyRemoved 72865=>-
    Wed 27 Dec 2017 08:36:23 PM UTCrik5Priority5 - Normal=>4
      Item GroupUnexpected Error=>Matlab Compatibility
      StatusNone=>Confirmed
      Release4.2.1=>dev

    Back to the top


    Powered by Savane 3.1-cleanup1