https://bugs.kde.org/show_bug.cgi?id=375635

            Bug ID: 375635
           Summary: Wrong code completion on switch with strongly-typed
                    enum
           Product: kdevelop
           Version: 5.1.0
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: nicolas.alva...@gmail.com
  Target Milestone: ---

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.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to