https://bugzilla.novell.com/show_bug.cgi?id=444235
Summary: incorrect consideration of generic constraints
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
The following code compiles in MS.Net, but not in gmcs as of the 2.2 branch. It
does compile correctly in at least 1.9, which I have on hand; and I believe 2.0
which I think I had working yesterday.
using System;
namespace Test
{
public interface IFoo
{
}
public class Foo : IFoo
{
}
public interface IBase
{
T Get<T>(object o);
}
public class TestClass : IBase
{
public T Get<T>(object o)
where T : IFoo
{
return default(T);
}
T IBase.Get<T>(object o)
{
return default(T);
}
public static void Main(string[] args)
{
Console.WriteLine(new TestClass().Get<Foo>(null));
}
}
}
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs