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

24 lines
255 B
C#

public class Z { }
public class A<X, Y>
where Y : Z
where X : Y
{
public X Foo (Y y)
{
return y as X;
}
}
public class Foo
{
public static int Main ()
{
var a = new A<Z, Z> ();
if (a.Foo (new Z ()) == null)
return 1;
return 0;
}
}