[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46571] Inconsistency between old and new oop
From: |
Stéphane Adjemian |
Subject: |
[Octave-bug-tracker] [bug #46571] Inconsistency between old and new oop syntax (wrt subsasgn) |
Date: |
Mon, 30 Nov 2015 13:38:58 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0 |
URL:
<http://savannah.gnu.org/bugs/?46571>
Summary: Inconsistency between old and new oop syntax (wrt
subsasgn)
Project: GNU Octave
Submitted by: step4n
Submitted on: Mon 30 Nov 2015 01:38:57 PM GMT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Stéphane Adjemian
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: Any
_______________________________________________________
Details:
Calls to the subsasgn are not working with the new class syntax. In the
attached files I provide two implementations of the same class with the old
and new (ie using classdef) interfaces.
With the new interface the following code :
a = myclass(data(10,2), {'v1'; 'v2'});
a{'v1'}=ones(10,1)
returns
error: invalid assignment to cs-list outside multiple assignment
while the same code returns the expected results with the old oop syntax. Note
also that both interfaces produce the same expected results with Matlab 2015b.
Debugging the code reveals that we never enter the @myclass/subsasgn
function.
Note also that the problem does not pop up if the length of the string used as
an index is equal to one, ie:
a = myclass(data(10,2), {'v1'; 'v2'});
a{'v'}=ones(10,1)
produces the expected result.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 30 Nov 2015 01:38:57 PM GMT Name: new-syntax.tar Size: 10kB By:
step4n
Two implementations of the same class
<http://savannah.gnu.org/bugs/download.php?file_id=35596>
-------------------------------------------------------
Date: Mon 30 Nov 2015 01:38:57 PM GMT Name: old-syntax.tar Size: 10kB By:
step4n
Two implementations of the same class
<http://savannah.gnu.org/bugs/download.php?file_id=35597>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46571>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #46571] Inconsistency between old and new oop syntax (wrt subsasgn),
Stéphane Adjemian <=