octave-bug-tracker
[Top][All Lists]
Advanced

[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 21:57:24 -0400 (EDT)

Follow-up Comment #13, bug #56856 (project octave):

Octave 9.0.0 (hg id: 818698c4f296)

no VM:

>> y = subsasgn (zeros(1, 10), substruct('()', {10}), inputParser())
error: operator =: no conversion for assignment of 'object' to indexed
'matrix'

>> a = test, pause
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
<snip>

*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




with VM:

>> vm_enable(1)

>> vm_enable
ans = 1

>> y = subsasgn (zeros(1, 10), substruct('()', {10}), inputParser())
error: operator =: no conversion for assignment of 'object' to indexed
'matrix'

>> a = test, pause
warning: Auto-compilation of test failed with message
Classdefconstructors are not supported by the VM yet
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
<snip>

*infinite loop. had to kill Octave*   


>> x(10)=test
warning: Auto-compilation of test failed with message
Classdefconstructors are not supported by the VM yet
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
>> Calling test.size
error: 'result1' undefined near line 2, column 11
error: called from
    size at line 4 column 1
<snip>
*Infinite loop, had to kill octave*




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56856>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]