| Summary: |
Wrong code completion on switch with strongly-typed enum |
| Product: |
[Applications] kdevelop
|
Reporter: |
Nicolás Alvarez <nalvarez> |
| Component: |
Language Support: CPP (Clang-based) | Assignee: |
kdevelop-bugs-null |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
normal
|
|
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
5.1.0 | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Compiled Sources | |
|
| OS: |
Linux | |
|
| URL: |
https://phabricator.kde.org/D10738
|
|
Latest Commit:
|
https://commits.kde.org/kdevelop/76d7b807825ddc1b30c4111bb27754f84a63c0a1
|
Version Fixed/Implemented In:
|
5.2.2
|
|
Sentry Crash Report:
|
|
| |
In a switch() statement that takes an enum-class type, code completion on the 'case' shows the possible enumerators, but doesn't include the enum name for scoping, so the resulting code doesn't compile. Example: enum class Color { Red, Yellow, Green, Blue }; void foo() { Color x; switch (x) { case //complete here } } The code completion shows 'Red', 'Yellow', 'Green' and 'Blue' as options, but doesn't include the Color:: part, leaving 'case Red:' which is invalid for strongly-typed enums.