class A where T : class {} class B : A where T : class {} class Test { internal static A x = new B (); public static void Main () { } }