[Bug 223898] New: [rename-refactoring] NB silently renames a C function with a name of an existent one

  • From:
  • To:
  • Subject: [Bug 223898] New: [rename-refactoring] NB silently renames a C function with a name of an existent one
  • Date: Sun, 16 Dec 2012 16:06:57 +0000
  • Auto-submitted: auto-generated

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

             Bug #: 223898
        Issue Type: DEFECT
           Summary: [rename-refactoring] NB silently renames a C function
                    with a name of an existent one
    Classification: Unclassified
           Product: apisupport
           Version: 7.2.1
          Platform: Macintosh
        OS/Version: Mac OS X
            Status: NEW
          Priority: P1
         Component: Refactoring
        AssignedTo: 

        ReportedBy: 

         QAContact: 



Build: 201210100934

NB refactoring support renames a C function to a name of an existent one
leading to compilation error: "previous definition of 'f1' was here"

Reproducible: Always

Steps to Reproduce:

1. Create a C file with the following code:

int f1(){
    return 1;
}

int f2(){
    return 2;
}

int main(){
    printf("%d", f1());
}

2. Apply the rename to the f2 function, typing in the New Name f1 (NB silently
do that):

int f1(){
    return 1;
}

int f1(){ //renamed function: f2 -> f1
    return 2;
}

int main(){
    printf("%d", f1());
}

3. The resulting code does not compile: 
refactoring-rename.c:5: error: redefinition of 'f1'
refactoring-rename.c:1: error: previous definition of 'f1' was here

-- 
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 223898] New: [rename-refactoring] NB silently renames a C function with a name of an existent one

gugawag 12/16/2012

[Bug 223898] [rename-refactoring] NB silently renames a C function with a name of an existent one

gugawag 12/16/2012

[Bug 223898] [rename-refactoring] NB silently renames a C function with a name of an existent one

jrechtacek 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