Bug 271083 - Using operator== in enums, code-complete enum values
Summary: Using operator== in enums, code-complete enum values
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Unclassified
Component: Language Support: CPP (old) (show other bugs)
Version: 4.2.1
Platform: Unlisted Binaries Linux
: NOR wishlist (vote)
Target Milestone: 4.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 271007 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-16 07:29 UTC by Nicolás Alvarez
Modified: 2011-06-09 08:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolás Alvarez 2011-04-16 07:29:47 UTC
enum Color { Red, Green, Blue };

void moo() {
    Color c = Red;
    if (c ==

This shows a "generic" code completion list (with local variables, etc). It should show Red, Green, Blue in the top matches.
Comment 1 Olivier.jg 2011-06-09 08:21:46 UTC
Git commit 18157909a4ce1bf631edbf80e23b437b8f5acb1d by Olivier JG.
Committed on 09/06/2011 at 08:19.
Pushed by olivierjg into branch 'master'.

Allow enum best-matches for binary operator functions
BUG: 271083

M  +2    -0    languages/cpp/codecompletion/context.cpp     
M  +22   -0    languages/cpp/tests/test_cppcodecompletion.cpp     
M  +1    -0    languages/cpp/tests/test_cppcodecompletion.h     

http://commits.kde.org/kdevelop/18157909a4ce1bf631edbf80e23b437b8f5acb1d
Comment 2 Olivier.jg 2011-06-09 08:23:46 UTC
*** Bug 271007 has been marked as a duplicate of this bug. ***