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 254268 - "Add Missing Cases Clauses" hint and C++11 enums
Summary: "Add Missing Cases Clauses" hint and C++11 enums
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: danilasergeyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 12:27 UTC by soldatov
Modified: 2015-08-17 16:31 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 soldatov 2015-08-11 12:27:09 UTC
Scenario:
- C++11 code

enum class Colors : int {
    RED, GREEN, BLUE
};

int main(int argc, char** argv) {
    Colors c = Colors::RED;
    switch (c) {
    }
    return 0;
}
==========================================

- Set cursor after "switch (c) {" and press Alt-Enter
- Select "Add Missing Cases Clauses" menu item
===>
IDE adds: case RED:
valid code: case Colors::RED:
Comment 1 danilasergeyev 2015-08-11 14:00:07 UTC
fixed, change set:
https://hg.netbeans.org/cnd-main/rev/fe08e0d34f5a
Comment 2 Vladimir Voskresensky 2015-08-11 14:04:17 UTC
We need other fix. This one breaks non c++11 code
Comment 3 danilasergeyev 2015-08-11 17:11:49 UTC
extra fix, change set:
https://hg.netbeans.org/cnd-main/rev/e9bcd6ef16f1
Comment 4 Quality Engineering 2015-08-12 01:17:28 UTC
Integrated into 'main-silver', will be available in build *201508120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fe08e0d34f5a
User: Danila Sergeyev <danilasergeyev@netbeans.org>
Log: fix bug #254268 "Add Missing Cases Clauses" hint and C++11 enums
Comment 5 Quality Engineering 2015-08-13 01:20:14 UTC
Integrated into 'main-silver', will be available in build *201508130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e9bcd6ef16f1
User: Danila Sergeyev <danilasergeyev@netbeans.org>
Log: extra fix for bug #254268 "Add Missing Cases Clauses" hint and C++11 enums