using System; class Foo { public T Test (U u) where U : T { return u; } } class X { public static void Main () { Foo foo = new Foo (); Y y = new Y (); X x = foo.Test (y); } } class Y : X { }