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.
Code: class A { public: A(int a) : a(a) {} int a; }; class B : public A { public: B(int b) : b(b) {} int b; }; class C : public A { public: C(int c) : c(c) {} int c; }; class D : public B, public C { public: // <-- generate constructor int d; }; int main() { D d; return 0; } Scenario: - Press Alt-Ins in class D - Select "Constructor..." menu item - Press Generate button ==> sometimes IDE generates "D(int c, int b) : C(c), B(b) {" line, in order cases IDE generates "D(int b, int c) : B(b), C(c) {"
I think if code contains "class A : public C, public B" declaration, then user or test expects "A(int c, int b) : C(c), B(b)"
fixed, change set: http://hg.netbeans.org/cnd-main/rev/05bc008420c6
Integrated into 'main-silver', will be available in build *201405300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/05bc008420c6 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #244622 Undefined arguments order in generated constructor
Integrated into 'releases/release80', will be available in build *201406041415* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/eaafd0711f47 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #244622 Undefined arguments order in generated constructor (transplanted from 05bc008420c6bb746c2b3d201abc5e9a7fc06d04)
Fix doesn't resolve original scenario.
(In reply to soldatov from comment #5) > Fix doesn't resolve original scenario. additional fix: http://hg.netbeans.org/cnd-main/rev/080f19d97103