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

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

[Octave-bug-tracker] [bug #58727] classdef method invocation broken when


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #58727] classdef method invocation broken when input is function result
Date: Fri, 10 Jul 2020 01:25:54 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Update of bug #58727 (project octave):

                  Status:               Confirmed => Ready For Test         

    _______________________________________________________

Follow-up Comment #2:

I think this bug has been around for a while now (probably since I started
refactoring the interpreter call stack more than a year ago) but it just
started showing up in another way recently.

To test this, you can go back to a revision before there were any attempts to
fix bug #58686 (for example 627da618dcc4) and modify the test class so that
the methods show the isargout status for each output by adding something like
the following code to each function


      [nargin, nargout]
      isargout (1:nargout)


Than you'll see incorrect results when tc.some_str is evaluated in the
argument list context in the expression


[~, tst2] = tc.do_something(tc.some_str)


The reason is that the expression "tc.some_str" is getting the isargout status
for the "[~, tst2] = ..." expression instead of the appropriate status for the
evaluation of each element of the argument list.

Recently, I changed the way the interpreter assigns outputs so that it could
detect when function outputs were unassigned.  That change also now checks
isargout and skips the assignment if the output is ignored, so that's why the
argument to do_something was undefined.

I pushed the following changeset to stable and merged with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/aa47120a505d


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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