[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56856] Matlab calls class subsasgn method wit
From: |
Nicholas Jankowski |
Subject: |
[Octave-bug-tracker] [bug #56856] Matlab calls class subsasgn method with array of double instead of class type |
Date: |
Fri, 13 Oct 2023 16:18:58 -0400 (EDT) |
Follow-up Comment #12, bug #56856 (project octave):
using the class from the attached @test2.zip:
Matlab 2023b:
>> y = subsasgn (zeros(1, 10), substruct('()', {10}), inputParser())
Unable to perform assignment because value of type 'inputParser' is not
convertible to 'double'.
Caused by:
Error using double
Conversion to double from inputParser is not possible.
>> a = test
calling the test constructor
a =
Calling test.size.
test with no properties
x
>> x(10)=a
Calling test.subsasgn(val, idx, rhs).
val is of type 'double':
val =
[]
idx is of type 'struct':
idx =
struct with fields:
type: '()'
subs: {[10]}
rhs is of type 'test':
rhs =
Calling test.size.
test with no properties.
Output argument "result" (and possibly others) not assigned a value in the
execution with "test/subsasgn" function.
Octave 8.3.0, no VM:
>> y = subsasgn (zeros(1, 10), substruct('()', {10}), inputParser())
error: operator =: no conversion for assignment of 'object' to indexed
'matrix'
>> a = test
calling the test constructor
a =
test object with properties:
>> Calling test.size.
error: 'result1' undefined near line 2, column 11
error: called from
size at line 4 column 1
>> Calling test.size.
error: 'result1' undefined near line 2, column 11
error: called from
size at line 4 column 1
>> Calling test.size.
error: 'result1' undefined near line 2, column 11
error: called from
size at line 4 column 1
>> Calling test.size.
error: 'result1' undefined near line 2, column 11
error: called from
size at line 4 column 1
>> Calling test.size.
error: 'result1' undefined near line 2, column 11
error: called from
size at line 4 column 1
Calling test.size.
>> error: 'result1' undefined near line 2, column 11
error: called from
size at line 4 column 1
>> Calling test.size.
<snip>
(stuck in infinite loop, had to kill octave)
>> x(10)=test
calling the test constructor
Calling test.subsasgn(val, idx, rhs).
val is of type 'test':
val =
test object array with properties:
idx is of type 'struct':
idx =
scalar structure containing the fields:
type = ()
subs =
{
[1,1] = 10
}
rhs is of type 'test':
rhs =
test object with properties:
Calling test.size.
error: 'result' undefined near line 2, column 10
error: called from
subsasgn at line 11 column 1
rebuilding v9 now to test that w and w/o VM
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56856>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/