bugGNU Octave - Bugs: bug #35448, incorrect function handle...

 
 

bug #35448: incorrect function handle resolution in recursive function call

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Sat 04 Feb 2012 07:23:14 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Ben AbbottOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 05 Feb 2012 08:42:11 PM UTC, comment #6:

Oops. I checked it in.

John W. Eaton <jwe>
Project Administrator
Sun 05 Feb 2012 08:37:15 PM UTC, comment #5:

John, did you forget to push parse-private.h ?

Ben Abbott <bpabbott>
Project Member
Sun 05 Feb 2012 07:34:37 PM UTC, comment #4:

I checked in the following changeset. This change appears to fix the problem for me, so I'm closing this report.

http://hg.savannah.gnu.org/hgweb/octave/rev/8d1ae996c122

John W. Eaton <jwe>
Project Administrator
Sun 05 Feb 2012 06:21:40 PM UTC, comment #3:

The examples use function handles, but there are no anonymous functions involved, so I changed the summary.

John W. Eaton <jwe>
Project Administrator
Sat 04 Feb 2012 09:00:44 PM UTC, comment #2:

Opps. that should be "fB" not "FB".

Ben Abbott <bpabbott>
Project Member
Sat 04 Feb 2012 08:43:02 PM UTC, comment #1:

In case it is important, if @fB is replaced with "FB" in fA.m, the error does not occur.

Ben Abbott <bpabbott>
Project Member
Sat 04 Feb 2012 07:23:14 PM UTC, original submission:

With each function in its own m-file

Running the script below, or typing the commands at the prompt produces the proper result.

The proper result is

The modified version below (@fC instead of @fB) throws an error.

The error is

Notice that in fA.m `w' evaluates to the proper result.

fB and fC are intentionally identical, and there is no problem if the global variable isn't used.

I've attached the files. foo.m is a script that runs the working and failing example.

Ben Abbott <bpabbott>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #24981:  Archive.zip added by bpabbott (780B - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by bpabbott (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 05 Feb 2012 07:34:37 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 05 Feb 2012 06:21:40 PM UTCjweSummaryparser problems with nested anonymous functions=>incorrect function handle resolution in recursive function call
    Sat 04 Feb 2012 07:23:14 PM UTCbpabbottAttached File-=>Added Archive.zip, #24981

    Back to the top


    Powered by Savane 3.1-cleanup1