bugGNU Octave - Bugs: bug #44665, error in concatenation of classdef...

 
 

bug #44665: error in concatenation of classdef objects

Submitter:  -X- <jsh>
Submitted:  Mon 30 Mar 2015 06:40:35 AM UTC
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Sun 07 Jun 2020 10:21:21 AM UTC, comment #3: 

This still isn't supported on current dev:

> a = [foo; foo];
warning: struct: converting a classdef object into a struct overrides the access restrictions defined for properties. All properties are returned, including private and protected ones.
error: invalid conversion of multi-dimensional struct to scalar struct

Markus M├╝tzel <mmuetzel>
Project Member
Thu 21 Apr 2016 04:02:04 PM UTC, comment #2: 

The error message is now:

warning: struct: converting a classdef object into a struct overrides the access restrictions defined for properties. All properties are returned, including private and protected ones.
warning: struct: converting a classdef object into a struct overrides the access restrictions defined for properties. All properties are returned, including private and protected ones.
error: octave_base_value::parent_class_name_list(): wrong type argument 'object'

A way around is:

a(1) = foo();
a(2) = foo()
a =

<object array foo>

Guillaume <gyom>
Tue 02 Jun 2015 04:43:24 PM UTC, comment #1: 

Retagging release from 4.0.0-rc2 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Mon 30 Mar 2015 06:40:35 AM UTC, original submission:  

Concatenation of classdef objects fail with the error messages:

error: invalid conversion of multi-dimensional struct to scalar struct
error: octave_base_value::parent_class_name_list(): wrong type argument 'object'

It seems at least one part of the problem are the '__parent_classes__' and 'parent_class_names' functions which do not seem to support classdef objects.

To test, create a class, for example:

classdef foo
  properties
    bar = 1;
  end
end

and try to concatenate some instances:

a = foo();
[ a a ]
__parent_classes__(a)

If this isn't supported yet maybe a better error message should be printed instead.

-X- <jsh>

 

(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

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by amro_octave
  • -email is unavailable- added by gyom (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by jsh (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 project members can vote.

     

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-07 mmuetzel Item GroupNone Feature Request
        StatusNone Confirmed
        Release4.0.0 dev
    2019-05-09 siko1056 Dependencies- bugs #53906 is dependent
    2016-12-09 amro_octave Carbon-Copy- Added amro_octave
    2015-06-02 jwe Release4.0.0-rc2 4.0.0

    Back to the top


    Powered by Savane 3.9