Bugzilla – Bug 322858
incorrect CS0278 (ambiguity) warning on generic collection (IEnumerable)
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by atsushi@ximian.com 2006-12-06 05:49:38 MST ---- The example code below causes extra warning: -------- using System; using System.Collections.Generic; public class Test { public static void Main () { IDictionary<string,object> c = new Dictionary<string,object> (); foreach (string s in c.Keys) Console.WriteLine (s); } } -------- Actual Results: collection.cs(9,3): warning CS0278: `System.Collections.Generic.ICollection<string>' contains ambiguous implementation of `enumerable' pattern. Method `System.Collections.IEnumerable.GetEnumerator()' is ambiguous with method `System.Collections.Generic.IEnumerable<string>.GetEnumerator()' C:\cygwin\usr\local\lib\mono\2.0\mscorlib.dll (Location of the symbol related to previous warning) C:\cygwin\usr\local\lib\mono\2.0\mscorlib.dll (Location of the symbol related to previous warning) Compilation succeeded - 1 warning(s) Expected Results: no warning. How often does this happen? consistently. Additional Information: ---- Additional Comments From marek.safar@seznam.cz 2006-12-06 06:15:49 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO79998 *** Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"