a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
30 lines
420 B
C#
30 lines
420 B
C#
using System;
|
|
|
|
public class GenericType<U> where U : IEquatable<U>
|
|
{
|
|
public U u;
|
|
}
|
|
|
|
public class Base
|
|
{
|
|
public virtual T Test<T> (GenericType<T> gt) where T : IEquatable<T>
|
|
{
|
|
return gt.u;
|
|
}
|
|
}
|
|
|
|
public class Override : Base
|
|
{
|
|
public override T Test<T> (GenericType<T> gt)
|
|
{
|
|
return base.Test (gt);
|
|
}
|
|
|
|
public static int Main ()
|
|
{
|
|
Base b = new Override ();
|
|
b.Test (new GenericType<int> ());
|
|
return 0;
|
|
}
|
|
}
|