bugGNU Octave - Bugs: bug #48031, command syntax fails when a local...

 
 

bug #48031: command syntax fails when a local variable in another scope shadows command

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Thu 26 May 2016 05:06:59 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 02 Jun 2016 10:03:25 PM UTC, comment #5:

I checked in the following changesets for this problem:

http://hg.savannah.gnu.org/hgweb/octave/rev/2ba69be3f3e8
http://hg.savannah.gnu.org/hgweb/octave/rev/0b5fd19477fd

John W. Eaton <jwe>
Project Administrator
Sat 28 May 2016 11:49:49 AM UTC, comment #4:

Try the attached patch. I think this could be checked in now, but I'm thinking that some of the other functions in the symbol table class could use the same change so that they could be used for any scope, not just the current one.

(file #37296)

John W. Eaton <jwe>
Project Administrator
Sat 28 May 2016 01:07:00 AM UTC, comment #3:

Really weird stuff here.

I modified foo.m to

And then

Rik <rik5>
Project Administrator
Fri 27 May 2016 10:36:36 PM UTC, comment #2:

Confirmed. This is a bug of longstanding. It appeared somewhere between version 3.6.4 and 3.8.2.

Also confirmed, switching from command syntax to function syntax makes this work.

Rik <rik5>
Project Administrator
Thu 26 May 2016 05:22:34 PM UTC, comment #1:

Ok, an even simpler example:

Mike Miller <mtmiller>
Project Administrator
Thu 26 May 2016 05:06:59 PM UTC, original submission:

This was reported on irc with the MIRToolbox (https://www.jyu.fi/hum/laitokset/musiikki/en/research/coe/materials/mirtoolbox/Download).

The following minimal reproducer throws the error for me:

The error is the same as if "axis" were a variable in the current scope, it appears as a "parser error" on the function that is called with command syntax.

Mike Miller <mtmiller>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #37296:  diffs.txt added by jwe (2KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mtmiller (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
    Thu 02 Jun 2016 10:03:25 PM UTCjweStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sat 28 May 2016 11:49:49 AM UTCjweAttached File-=>Added diffs.txt, #37296
    Fri 27 May 2016 10:36:36 PM UTCrik5StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1