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 243721

Summary: "extract body" deletes method declaration (= default, = delete)
Product: cnd Reporter: soldatov <soldatov>
Component: EditorAssignee: Alexander Simon <alexvsimon>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 8.0.1   
Hardware: PC   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:

Description soldatov 2014-04-10 07:53:27 UTC
Code:

class A {
public:
    A(int i);
    int foo() = delete;
private:
    int i;
};

A::A(int i) : i(i) {}

int main(int argc, char** argv) {
    A a(1);
    return 0;
}

Scenario:
- Call code completion before main()
- Select "A::foo() - extract body" menu item
==>

class A {
public:
    A(int i);
    ;;
private:
    int i;
};

A::A(int i) : i(i) {
}

int A::foo()int foo() = delete

int main(int argc, char** argv) {
    A a(1);
    return 0;
}
Comment 1 soldatov 2014-04-10 07:55:08 UTC
other case:

class A {
public:
    A(int i);
    A() = default;
private:
    int i;
};

A::A(int i) : i(i) {}

int main(int argc, char** argv) {
    A a(1);
    return 0;
}
Comment 2 Alexander Simon 2014-04-11 14:46:29 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/6beeb1bbc7de
Comment 3 Quality Engineering 2014-04-18 02:42:14 UTC
Integrated into 'main-silver', will be available in build *201404180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d96a73a8d610
User: Petr Kudryavtsev <petrk@netbeans.org>
Log: Changes in model for bug #243721 - "extract body" deletes method declaration (= default, = delete)
Comment 4 soldatov 2014-04-22 08:04:07 UTC
verified in trunk build 201404220001
Comment 5 Quality Engineering 2014-04-24 02:15:31 UTC
Integrated into 'releases/release80', will be available in build *201404240045* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/ed34270f3903
User: Ilia Gromov <ilia@netbeans.org>
Log: Changes in model for bug #243721 - "extract body" deletes method declaration (= default, = delete) [ Merge of 282663:d96a73a8d610 from cnd-main ]
Comment 6 soldatov 2014-04-28 13:14:33 UTC
verified in NetBeans 8.0 patch1