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

 
 

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

Submitted by:  PIERRE LABRECHE <pierre5018>
Submitted on:  Wed 12 May 2021 06:06:10 PM UTC  
 
Category:  Interpreter 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

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project Member
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)
  •  

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

    Date Changed by Updated Field Previous Value => Replaced by
    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.6