f3e3aab35a
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
27 lines
298 B
C#
27 lines
298 B
C#
public interface I<T>
|
|
{
|
|
T Clone();
|
|
T1 Clone<T1>() where T1 : T;
|
|
}
|
|
|
|
public interface I2 : I<I2>
|
|
{
|
|
}
|
|
|
|
public class TestClass : I2
|
|
{
|
|
public I2 Clone ()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public T1 Clone<T1> () where T1 : I2
|
|
{
|
|
return (T1) Clone();
|
|
}
|
|
|
|
public static void Main ()
|
|
{
|
|
new TestClass ();
|
|
}
|
|
} |