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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59704] function call on classdef subobject fa


From: Fernando
Subject: [Octave-bug-tracker] [bug #59704] function call on classdef subobject fails with "numel: invalid return value"
Date: Sun, 17 Jan 2021 15:54:57 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0

Follow-up Comment #11, bug #59704 (project octave):

Oops! Sorry. It was supposed to solve test case from comment #1 but I did not
check it properly. I tried it with:


octave:1> o=bug59704();
octave:2> [~,o.p]=size(rand(2,5));


and it worked. However, as you say, it does not work with


octave:2> o.test();


or with


[~,o.p]=bug59704_test(o.p)


After some debugging, I saw that it happens because bug59704_test is a user
function. In that case, the function numel of the lvalue o.p is called also
when evaluating the right hand side of the asignment, which is something I had
not anticipated.

Not sure how to best fix this.


    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Mensaje enviado vía Savannah
  https://savannah.gnu.org/




reply via email to

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