using System; class R where T : System.IDisposable where U : T { public void M (U u) { using (u) { } } } struct S where T : System.IDisposable where U : struct, T { public void M (U u) { using (u) { } } } class X : IDisposable { public void Dispose () { } public static void Main () { new R ().M (new X ()); new S ().M (new Y ()); } } struct Y : IDisposable { public void Dispose () { } }