Bug 322858 (MONO80162) - incorrect CS0278 (ambiguity) warning on generic collection (IEnumerable)
Summary: incorrect CS0278 (ambiguity) warning on generic collection (IEnumerable)
Status: RESOLVED MOVED
Alias: MONO80162
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.2
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Raja R Harinath
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-06 12:49 UTC by Atsushi Enomoto
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:18:41 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"