This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 98058 - [rename field] Renaming parenthesized field assignment yields compilation error
Summary: [rename field] Renaming parenthesized field assignment yields compilation error
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-16 04:45 UTC by kely_garcia
Modified: 2007-04-03 18:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kely_garcia 2007-03-16 04:45:24 UTC
Build ID: 200609161800 (Netbeans 6.0 M3)

Steps To Reproduce:
Rename field "f" to "newF" on the following:
public class A {
    int f;
    
    void m(int g){
        (f)=g;
    }  
}

Yields the following refactored class:
public class A {
    int newF;
    
    void m(int g){
        (f)=g;
    }  
}

Note: Field "f" can only be renamed outside method "m". 
If you try to rename field "f" inside method "m", you get this error: Cannot 
rename this type of object. Java package, method, field or class must be 
selected.
Comment 1 Pavel Flaska 2007-03-22 21:39:06 UTC
The issue is no longer reproducible in current trunk build, please, try to
reproduce in new builds. Tested in custom build 20070322.

Marking as fixed, reopen, if you are able to reproduce in current builds. 
Thanks for the report. Also rename in parenthesized is possible now.