[Mono-bugs] [Bug 525081] New: Possible Invalid Compiler Error CS0695 - The same code works in .Net

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 24 11:56:43 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=525081


           Summary: Possible Invalid Compiler Error CS0695 - The same code
                    works in .Net
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: i586
        OS/Version: openSUSE 11.1
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tony_hild at yahoo.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1)
Gecko/20090714 SUSE/3.5.1-1.1 Firefox/3.5.1

The compiler throws this exception

[Task:File=/home/tony/dev/axiomengine/Projects/Axiom/Source/Engine/Collections/Map.cs,
Line=71, Column=18, Type=Error, Priority=Normal,
Description=`Axiom.Collections.Map<K,T>' cannot implement both
`System.Collections.Generic.IEnumerable<T>' and
`System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<K,System.Collections.Generic.List<T>>>'
because they may unify for some type parameter substitutions(CS0695)]


in this class construction: 

    public class Map<K, T> : IDictionary<K, List<T>>,
                       ICollection<KeyValuePair<K, List<T>>>,
                       IEnumerable<KeyValuePair<K, List<T>>>,
                       IDictionary, ICollection, IEnumerable, IEnumerable<T>,
IEnumerable<List<T>>
    {}


IEnumerable<T> and IEnumerable<KeyValuePair<K,List<T>>> will never be the same
because List<T> walways will depend on T in a ciclycal way.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list