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

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

[Octave-bug-tracker] [bug #60237] Differente behaviour in anonymous func


From: anonymous
Subject: [Octave-bug-tracker] [bug #60237] Differente behaviour in anonymous function handling
Date: Fri, 2 Apr 2021 13:37:59 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:68.9) Gecko/20100101 Goanna/4.6 Firefox/68.9 Mypal/28.14.2

Follow-up Comment #28, bug #60237 (project octave):

Re: comment #27. I agree with that. But the case in comment #25 is different
issue:
It seems that if a nested function (that captures mutable variables by
reference) is called form an anonymous function (that captures immutable
variables by value) it is converted to a handle to a nested function (that
captures mutable variables by value).
So the expression `r = @() bm (a);` is treated as `r = @() (@bm) (a);` as the
result of test case in comment #25 results in [2 3]. That is very
interesting!



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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