[Mono-bugs] [Bug 399214] New: Blocks Boo: compilation error with generic interface constraints

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 11 06:28:36 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=399214


           Summary: Blocks Boo: compilation error with generic interface
                    constraints
           Product: Mono: Compilers
           Version: SVN
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: cedricv at neonux.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Since boo revision 3006, boo cannot compile with gmcs whereas it compiles fine
with csc.

gmcs issues an error :

test.cs(18,36): error CS0123: A method or delegate
`Test.ExplicitMembersFirst(IExplicitMember, IExplicitMember)' parameters do not
match delegate `System.Comparison<TMember>(TMember, TMember)' parameters



Extracted the testcase below :


using System.Collections.Generic;

public class TypeDefinition {}
public class TypeMember {}
public interface IEntityWithParameters {}
public interface IMember {}
public interface IExplicitMember {}

public class Test
{
                public IEnumerable<TMember>
GetAbstractMemberImplementationCandidates<TMember, TEntity>(

                        TypeDefinition node, TEntity baseEntity)

                        where TEntity : IEntityWithParameters, IMember

                        where TMember : TypeMember, IExplicitMember             

                {

                        List<TMember> candidates = new List<TMember>();



                        candidates.Sort(ExplicitMembersFirst);

                        return candidates;

                }



                private int ExplicitMembersFirst(IExplicitMember lhs,
IExplicitMember rhs)
                {

                        return 0;

                }
}


(same version on http://monoport.com/17637)


-- 
Configure bugmail: https://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