a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
26 lines
365 B
C#
26 lines
365 B
C#
public class TestClass<T> where T : class
|
|
{
|
|
public bool Check (T x, T y) { return x == y; }
|
|
}
|
|
|
|
public class C
|
|
{
|
|
}
|
|
|
|
public class TestClass2<T> where T : C
|
|
{
|
|
public bool Check (T x, T y) { return x == y; }
|
|
}
|
|
|
|
public class X
|
|
{
|
|
public static int Main ()
|
|
{
|
|
new TestClass<object> ().Check (null, null);
|
|
new TestClass2<C> ().Check (null, null);
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|