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 206416 - Renaming a local variable in C/C++ code changes the name of other variables with the same name in other scopes
Summary: Renaming a local variable in C/C++ code changes the name of other variables w...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 03:38 UTC by swpalmer
Modified: 2014-07-31 08:31 UTC (History)
1 user (show)

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 swpalmer 2011-12-15 03:38:35 UTC
Product Version = NetBeans IDE 7.1 (Build 201112051121)
Operating System = Mac OS X version 10.7.2 running on x86_64
Java; VM; Vendor = 1.6.0_29
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402

E.g. for code like this with two different variables named "x" in different scopes, ctrl-R to rename the second one will highlight the first and rename it as well.

void Test::test() {
    {
        MyClass x(1);
        x.doSomething();
    }
    {
        MyOtherClass x("whatever");
        x.doSomethingElse();
    }
}
Comment 1 Vladimir Voskresensky 2011-12-15 07:21:12 UTC
confirmed.
Thanks for the report!
Comment 2 Vladimir Voskresensky 2011-12-15 08:52:02 UTC
will fix
Comment 4 Quality Engineering 2011-12-17 16:47:10 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f09827154339
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #206416 - Renaming a local variable in C/C++ code changes the name of other variables with the same name in other scopes
Comment 5 Vladimir Kvashin 2012-03-28 15:53:25 UTC
blacktie: 
rev/f89feec97df8
releases701 (release71_fixes branch): 
http://hg.netbeans.org/releases/rev/b1911c2fc26f
Comment 6 Quality Engineering 2012-03-29 11:58:54 UTC
Integrated into 'releases', will be available in build *201203291150* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/b1911c2fc26f
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #206416 - Renaming a local variable in C/C++ code changes the name of other variables with the same name in other scopes
(transplanted from f09827154339ffa4117d478dd3cc3b1edf10cfe8)
Comment 7 Alexander Pepin 2012-04-02 09:31:45 UTC
verified in trunk
Comment 8 soldatov 2012-04-16 13:15:42 UTC
verified in NetBeans IDE 7.1.2 (Build 201204101705)
Comment 9 Alexander Pepin 2012-05-14 13:53:50 UTC
verified in NB 7.0.1 patch3 candidate (build 201205021427)