bugGNU Octave - Bugs: bug #51567, Creating a function handle to...

 
 

bug #51567: Creating a function handle to method from within another method fails using str2func

Submitter:  Piotr Held <jsoh425>
Submitted:  Mon 24 Jul 2017 11:59:45 PM UTC
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Need Info Assigned to:  None
Originator Name:  Piotr Held Open/Closed:  * Open
Release:  * dev Operating System:  * GNU/Linux
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Thu 11 Jun 2020 01:50:50 PM UTC, comment #2: 

I believe that part of this problem is fixed after this changeset:

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

I also added a test that attempts to verify that the bug is fixed:

  http://hg.savannah.gnu.org/hgweb/octave/rev/5bca1527b034

Now, I see that creating a function handle with the @FCN syntax appears to work but using str2func ("FCN") fails.  I assume that both should work, but I'm not certain that Matlab treats @FCN identically to str2func in all cases.  I think Octave's current implementation of str2func is always creating a "simple" function handle but the @FCN is searching for class methods and nested functions when creating the function handle.  Before proceeding, I'd like verification of Matlab behavior.

John W. Eaton <jwe>
Project Administrator
Tue 08 Aug 2017 12:05:01 AM UTC, comment #1: 

Is this just another example of the fact that function handles to nested functions can't be created?  I'm thinking of bug #39257.  Or is this new behavior?

Rik <rik5>
Project Administrator
Mon 24 Jul 2017 11:59:45 PM UTC, original submission:  

Creating a function handle to a method within another method fails.

I am attaching test case.

Piotr Held <jsoh425>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #41324:  fcn_handle_classdef.m added by jsoh425 (294B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jsoh425 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-11 jwe StatusNone Need Info
        SummaryCreating a function handle to method from within another method fails Creating a function handle to method from within another method fails using str2func
    2017-07-24 jsoh425 Attached File- Added fcn_handle_classdef.m, #41324

    Back to the top


    Powered by Savane 3.9