[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44844] indexed field assignment in constructo
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #44844] indexed field assignment in constructor converts legacy nested class object to struct |
Date: |
Tue, 22 Aug 2017 15:33:59 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #44844 (project octave):
Item Group: Incorrect Result => Matlab Compatibility
Status: None => Confirmed
Summary: field assignment converts class object to struct =>
indexed field assignment in constructor converts legacy nested class object to
struct
_______________________________________________________
Follow-up Comment #3:
This has something to do specifically with either the nested definition of one
object inside another, or with the indexing operation that is done inside the
constructor, or the combination of both.
If I trivially rewrite the constructor to avoid nested indexing and
assignments together like this:
tmp = prova (sp.knots(ind));
tmp.dofs = ind;
tmp.spline_space.dofs = tmp.dofs;
sp.boundary(iside) = tmp;
then it works correctly as in Matlab.
The error only happens because of the assignment
sp.boundary(iside).spline_space.dofs = sp.boundary(iside).dofs;
I'm unable to convert this class example to classdef, so I have to assume this
affects legacy classes for now, until someone can show an example that also
affects classdef.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44844>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #44844] indexed field assignment in constructor converts legacy nested class object to struct,
Mike Miller <=