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 203795 - "Change method parameters" refactoring breaks compilation
Summary: "Change method parameters" refactoring breaks compilation
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 06:29 UTC by Vladimir Kvashin
Modified: 2011-10-18 15:32 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 Vladimir Kvashin 2011-10-17 06:29:13 UTC
If check box "Use ... default value only in declaration" is on,
refactoring produces code that does not compile, because the default value in declaration is commented out.

Here is an example of generated code

void foo(int par0 /* = 0 */) { // this "=0" should be uncommented!!!
}

void foo_caller() {
    foo();
}
Comment 1 Quality Engineering 2011-10-18 01:31:10 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/a8368b521830
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #203795 - "Change method parameters" refactoring breaks compilation
- when function has only one declaration which is definition => put default value in signature