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 173254 - Refactoring renames attributes within scope of another variable
Summary: Refactoring renames attributes within scope of another variable
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks: 173077
  Show dependency tree
 
Reported: 2009-09-29 11:45 UTC by Alexandr Scherbatiy
Modified: 2009-10-05 11:06 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 Alexandr Scherbatiy 2009-09-29 11:45:23 UTC
Steps to reproduce:

- Copy the code to the editor:
-----------------------------------------------------
class A{
    public var a:Object;

    public function show(){};
    public function show(a:A){
        a.show();
    }

}
-----------------------------------------------------

- Refactor->rename the 'a' attribute of the 'A' class to 'b'

The result is:
-----------------------------------------------------
class A{
    public var b:Object;

    public function show(){};
    public function show(a:A){
        b.b();
    }

}
-----------------------------------------------------

Main.fx:17: cannot find symbol
symbol  : function b()
location: class java.lang.Object
        b.b();
1 error
Comment 1 J Bachorik 2009-09-30 12:55:56 UTC
fixed in http://hg.netbeans.org/javafx/rev/808ffe3fa608
Comment 2 Alexandr Scherbatiy 2009-10-02 12:47:34 UTC
Now the attribute refactoring also renames the function argument name.

from 'a' to 'b':
----------------------------------
class A{
    public var b:Object;

    public function show(){};
    public function show(b:A){  // <- Argument should have 'a' name
        b.show();
    }

}
----------------------------------

The function argument name should not be changed in this case.
Comment 3 J Bachorik 2009-10-02 13:38:47 UTC
fixed (now for real) as a side-effect of http://hg.netbeans.org/javafx/rev/0132b76a8d5e
Comment 4 Alexandr Scherbatiy 2009-10-05 11:06:38 UTC
verified in netbeans-trunk-nightly-200910030241-javafx-full.zip