[Bug 223935] New: [rename-refactoring] NB silently renames a variable inside a inner block to a name of an existent one outside

  • From:
  • To:
  • Subject: [Bug 223935] New: [rename-refactoring] NB silently renames a variable inside a inner block to a name of an existent one outside
  • Date: Mon, 17 Dec 2012 14:26:05 +0000
  • Auto-submitted: auto-generated

http://netbeans.org/bugzilla/show_bug.cgi?id=223935

             Bug #: 223935
        Issue Type: DEFECT
           Summary: [rename-refactoring] NB silently renames a variable
                    inside a inner block to a name of an existent one
                    outside
    Classification: Unclassified
           Product: apisupport
           Version: 7.2.1
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Priority: P2
         Component: Refactoring
        AssignedTo: 

        ReportedBy: 

         QAContact: 



Build: 201210100934 (Same result in NB 7.3 Beta 2 Build 201211062253)

NB refactoring support renames a variable inside a inner block to a name of an
existent one outside this block, leading to a behavioral change of the app.

Reproducible: Always

Steps to Reproduce:

1. Create a C file with the following code:

#include <stdio.h>
int main(void){
    int two = 2;
    {
       int three = 3;
       printf("%d", two);
    }
    return 0;
}

obs.: output of this program: 2

2. Apply the rename to the "three" variable inside the inner block, typing in
the New Name "two" (NB silently do that):

#include <stdio.h>
int main(void){
    int two = 2;
    {
       int two = 3;
       printf("%d", two);
    }
    return 0;
}

3. The program change its output: from 2 to 3

-- 
Configure bugmail: http://netbeans.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.


[Bug 223935] New: [rename-refactoring] NB silently renames a variable inside a inner block to a name of an existent one outside

gugawag 12/17/2012

[Bug 223935] [rename-refactoring] NB silently renames a variable inside a inner block to a name of an existent one outside

gugawag 12/17/2012

[Bug 223935] [rename-refactoring] NB silently renames a variable inside a inner block to a name of an existent one outside

gugawag 12/17/2012

[Bug 223935] [rename-refactoring] NB silently renames a variable inside a inner block to a name of an existent one outside

ovrabec 12/17/2012

Project Features

About this Project

APIsupport was started in November 2009, is owned by Antonin Nebuzelsky, and has 117 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close