Bug 2668 - No completion offered for enum keys of Dictionaries
Summary: No completion offered for enum keys of Dictionaries
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 2.8
Hardware: PC Windows
: Low normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-12-28 13:25 UTC by derrickcreamer
Modified: 2012-04-17 01:23 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description derrickcreamer 2011-12-28 13:25:13 UTC
No completion suggestions are offered for enum keys of a Dictionary. The value type of the Dictionary doesn't matter.

Steps to reproduce:

1. Declare any enum:

  public enum SomeEnum{One,Two};

2. Declare a Dictionary with that enum as its key, and any type as its value:

  Dictionary<SomeEnum,int> dict = new Dictionary<SomeEnum,int>();

3. Type "dict[" to trigger completion suggestions.

  (note that One and Two do not appear in the full list)

4. Continue to type "dict[One".

  (note that there is no specific suggestion for One)

Expected results:
To see expected results, type "SomeEnum s = ".
Note that SomeEnum.One and SomeEnum.Two appear in the suggestions list, as they should for Dictionaries too.

Encountered on Windows 7 Home Premium SP1, with MonoDevelop 2.8
Comment 1 Mike Krüger 2012-04-17 01:23:10 UTC
works in the 2.9.x line.
(But I added your case to the unit test suite to get sure it doesn't break again.)