bugGNU Octave - Bugs: bug #60593, Octave should issue error on...

 
 

bug #60593: Octave should issue error on unknown classdef, properties, or methods attributes

Submitter:  PIERRE LABRECHE <pierre5018>
Submitted:  Wed 12 May 2021 06:06:10 PM UTC
   
 
Category:  Classdef Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  PIERRE LABRECHE Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 18 May 2021 01:15:04 PM UTC, comment #3: 

It's not a fix, but I pushed a changeset that notes a possible way to fix this problem if someone is interested in working on it:

http://hg.savannah.gnu.org/hgweb/octave/rev/f625b7670c0e

This bug also applies to attributes attached to the class itself, not just properties and methods blocks.

John W. Eaton <jwe>
Group administrator
Mon 17 May 2021 05:01:28 PM UTC, comment #2: 

Re-titling to better describe the issue from comment #2.

Fwiw, with Matlab R2021a:

>> a = class_with_constant_property_fails;
Error using class_with_constant_property_fails
Illegal attribute 'constant'.


Markus Mützel <mmuetzel>
Group administrator
Wed 12 May 2021 06:45:17 PM UTC, comment #1: 

I found that the attribute "Constant" must be written with an initial capital.  There should be a warning when an unknown attribute is found in the classdef properties or methods blocks.


PIERRE LABRECHE <pierre5018>
Wed 12 May 2021 06:06:10 PM UTC, original submission:  

Octave incorrectly reports

"error: property '(property name here)' is not constant"

In the code below, S is incorrectly flagged as non constant:

classdef class_with_constant_property_fails
  properties( constant )
  S = struct("A", 10) ;
  endproperties
endclassdef


PIERRE LABRECHE <pierre5018>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pierre5018 (Submitted the item)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-23 mmuetzel CategoryInterpreter Classdef
    2021-05-18 jwe Summaryclassdef should issue an error on unknown property or methods attributes Octave should issue error on unknown classdef, properties, or methods attributes
    2021-05-17 mmuetzel Item GroupUnexpected Error or Warning Missed Error or Warning
        StatusNone Confirmed
        Release6.2.0 dev
        Operating SystemMicrosoft Windows Any
        Summaryclassdef constant property failure classdef should issue an error on unknown property or methods attributes

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code