bugGNU Octave - Bugs: bug #45457, Incorrect behavior of constant...

 
 

bug #45457: Incorrect behavior of constant classdef properties referencing other constant properties in the same block

Submitter:  None
Submitted:  Wed 01 Jul 2015 06:12:31 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Duplicate Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 11 Mar 2019 07:42:31 PM UTC, comment #1: 

This bug is still present. It's also been reported later as bug #52582, and there is more discussion there, so I'm closing this as a duplicate. Please follow bug #52582 and post any patches or comments there.

Mike Miller <mtmiller>
Group Member
Wed 01 Jul 2015 06:12:31 PM UTC, original submission:  

The following classdef, where NamedConst.D references NamedConst.R defined in the same block does not work correctly with Ocatve 4.0.0.  In Matlab, this same classdef works correctly according to http://www.mathworks.com/help/matlab/matlab_oop/properties-with-constant-values.html

classdef NamedConst
   properties (Constant)
      R = pi/180;
      D = 1/NamedConst.R;
      AccCode = '0145968740001110202NPQ';
      RN = rand(5);
   end
end

The expected result is that NamedConst.D = 57.296.  In Octave 4.0.0, however, NamedConst.D is undefined when accessing it.  In addition, all properties defined after "D" are also undefined.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only group members can vote.

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2019-03-11 mtmiller StatusNone Duplicate
    Open/ClosedOpen Closed
    Dependencies- Depends on bugs #52582

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code