[Mono-bugs] [Bug 80162][Min] New - incorrect CS0278 (ambiguity) warning on generic collection (IEnumerable)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Dec 6 05:49:39 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by atsushi at ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80162

--- shadow/80162	2006-12-06 05:49:39.000000000 -0500
+++ shadow/80162.tmp.1191	2006-12-06 05:49:39.000000000 -0500
@@ -0,0 +1,57 @@
+Bug#: 80162
+Product: Mono: Compilers
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: incorrect CS0278 (ambiguity) warning on generic collection (IEnumerable)
+
+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:


More information about the mono-bugs mailing list