One more generics error for you all. The following compiles on Windows .NET,
but Mono seems to have issues. Again, this is compiling against SVN HEAD.
I¹ll file a Bugzilla report in the morning.

Tom


using System;
using System.Collections.Generic;

namespace Test
{
    public enum Enum
    {
        One,
        Two,
    }
    
    class CompilerTest
    {
        protected static int DoSomething<T>(string s, T t, ref T t2)
        {
            return 0;
        }
        
        // .NET 3.5 infers Enum from T, Mono is confused
        public static void ThisDoesNotWork()
        {
            // Nullable does not work
            Enum? e = Enum.One;
            DoSomething("abc", Enum.Two, ref e);
        }

        public static void ThisWorksFine()
        {
            Enum e = Enum.One;
            DoSomething("abc", Enum.Two, ref e);
        }
    }
}
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to