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