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

Submitted by:  None
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

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


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>
Project Administrator
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);

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.



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

Attach Files:

No files currently attached


   bug dependencies.

Items that depend on this one: None found


CC list is empty


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 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.6