Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

38 lines
347 B
C#

interface ITest
{
void Test ();
}
class Tester<T> where T : ITest, new ()
{
public void Do ()
{
new T ().Test ();
}
}
class Reference : ITest
{
public void Test ()
{
}
}
struct Value : ITest
{
public void Test ()
{
}
}
class C
{
public static void Main ()
{
new Tester<Reference> ().Do ();
new Tester<Value> ().Do ();
}
}