using System; class Gen where T : class { public static bool Foo (T t) { return t is Program; } } class Program { static bool Foo () { object o = 1; return o is T; } public static int Main () { if (Foo ()) return 1; if (!Foo ()) return 2; if (Gen.Foo (null)) return 3; if (!Gen.Foo (new Program ())) return 4; Console.WriteLine ("ok"); return 0; } }