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: anonymous
Subject: [Octave-bug-tracker] [bug #56856] Matlab calls class subsasgn method with array of double instead of class type
Date: Sat, 14 Oct 2023 07:51:07 -0400 (EDT)

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

The function size is called because the assignment isn't ended with a
semicolon.

a = test

Octave wants to display the properties of the object so calls the "display"
function and "display" calls "size" and because the "size" function of the
class is ill defined an error is shown.
In
http://hg.savannah.gnu.org/hgweb/octave/file/88ecbd109776/libinterp/parse-tree/pt-eval.cc#l4422
file "pt-eval.cc" changing line 4422:

m_interpreter.feval ("display", args);

to:

try
  {
     m_interpreter.feval ("display", args);
  }
catch (...)
  {}

may solve the problem.
I think "[]" is the caconical empty and is able to combine with any type.
Possibly MATLAB may accept this expression:

y = subsasgn ([], substruct('()', {10}), inputParser());




    _______________________________________________________

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]