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 215298 - "Use New Parameter Default Value Only In Declaration" checkbox breaks code
Summary: "Use New Parameter Default Value Only In Declaration" checkbox breaks code
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: issues@cnd
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2012-07-09 14:43 UTC by soldatov
Modified: 2012-09-06 16:17 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 soldatov 2012-07-09 14:43:23 UTC
NetBeans trunk (not in 7.2) or Oracle Solaris Studio build 16.0
RefactorChangeParametersTest.testInDeclarationOnly test

Code:

#include <cstdlib>
using namespace std;
class AA {
public:
    int method(int i);
};

int AA::method(int i) {
    return 0;
}

int main(int argc, char** argv) {
    AA aa;
    aa.method(1);
    return 0;
}


Scenario:
- Call Refactor|Change Function Parameters... on "aa.method(1);" line
- Switch on "Use New Parameter Default Value Only In Declaration" checkbox
- Add 2 new parameters
- Push Refactor button
- Build project
==> build failed on "aa.method(1,);" string
Comment 1 Alexander Pepin 2012-09-04 10:28:57 UTC
It looks like a regression caused by the fix for bug #214460. Now that bug is also reproducible in 7.2 patch 1 build candidate 20120901. It would be nice to fix it in patch1.
Comment 2 Vladimir Voskresensky 2012-09-04 15:13:55 UTC
fixed
http://hg.netbeans.org/cnd-main/rev/35e2e460231e
Comment 3 Quality Engineering 2012-09-05 02:06:06 UTC
Integrated into 'main-golden', will be available in build *201209050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/35e2e460231e
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #215298 - "Use New Parameter Default Value Only In Declaration" checkbox breaks code
Comment 4 soldatov 2012-09-05 11:55:59 UTC
verified in trunk. fix can be integrated into NetBeans 7.2 patch 1
Comment 5 Vladimir Voskresensky 2012-09-05 14:33:13 UTC
35e2e460231e transplanted to c583631a3887
http://hg.netbeans.org/releases/rev/c583631a3887
Comment 6 Alexander Pepin 2012-09-06 16:11:06 UTC
verified in 7.2 patch 1 build candidate 20120906
Comment 7 Quality Engineering 2012-09-06 16:17:57 UTC
Integrated into 'releases', will be available in build *201209061210* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/c583631a3887
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #215298 - "Use New Parameter Default Value Only In Declaration" checkbox breaks code
(transplanted from 35e2e460231e2b62c87ab834c8d59972b97c8c03)