[Mono-bugs] [Bug 359611] New: gmcs have trouble compiling the convertion from generic type extanding another one to its base interface

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Feb 7 10:57:19 EST 2008


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


           Summary: gmcs have trouble compiling the convertion from generic
                    type extanding another one to its base interface
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: jbevain at novell.com
         QAContact: mono-bugs at lists.ximian.com
                CC: rodrigobamboo at gmail.com
          Found By: ---


Repro:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;

public interface IFoo<T> : IEnumerable<T> {}

public static class FooRocks {

        public static IFoo<T> OrderBy<T, T2> (this IFoo<T> foo,
Expression<Func<T, T2>> expression)
        {
                return Process (foo, data => { return data.OrderBy
(expression.Compile ()); } );
        }

        public static IFoo<T> Process<T> (IFoo<T> foo,
                Func<IEnumerable<T>, IEnumerable<T>> processor)
        {
                processor (foo);

                return foo;
        }
}

class Repro {

        static void Main ()
        {
        }
}


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


More information about the mono-bugs mailing list