[Mono-bugs] [Bug 538801] Object initializer for generic type generates invalid IL
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Sep 12 17:58:42 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=538801
User tegansblueworld at gmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=538801#c1
--- Comment #1 from Tegan Mulholland <tegansblueworld at gmail.com> 2009-09-12 15:58:41 MDT ---
Not sure if the attachment worked, here is the example code:
class MainClass
{
public static void Main (string[] args)
{
MyGenericClass<GenericImplementation> genericClass = new
MyGenericClass<GenericImplementation>();
}
}
public interface IGenericInterface
{
int SomeValue { get; set; }
}
public struct GenericImplementation : IGenericInterface
{
public int SomeValue { get; set; }
}
internal class MyGenericClass<T>
where T : struct, IGenericInterface
{
public MyGenericClass()
{
T value = new T { SomeValue = 0 };
}
}
--
Configure bugmail: http://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