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

40 lines
549 B
C#

using System;
public class Z : IGenericInterface<Z>
{
public Z Start ()
{
return this;
}
Z IGenericInterface<Z>.Start ()
{
throw new ApplicationException ();
}
}
public interface IGenericInterface<T>
{
T Start ();
}
public class A<T> where T : Z, IGenericInterface<int>
{
public void SomeOperation (T t)
{
t.Start ();
}
}
public class C : Z, IGenericInterface<int>
{
int IGenericInterface<int>.Start ()
{
throw new NotImplementedException ();
}
public static void Main ()
{
new A<C> ().SomeOperation (new C ());
}
}