+ public static int test_0_throw_dead_this () {
+ new Foo<string> ("").throw_dead_this ();
+ return 0;
+ }
+
+ public static int test_0_generic_virtual_on_interfaces () {
+ Foo<string>.count1 = 0;
+ Foo<string>.count2 = 0;
+ Foo<string>.count3 = 0;
+
+ IFoo f = new Foo<string> ("");
+ for (int i = 0; i < 1000; ++i) {
+ f.Bar <int> ();
+ f.Bar <string> ();
+ f.NonGeneric ();
+ }
+
+ if (Foo<string>.count1 != 1000)
+ return 1;
+ if (Foo<string>.count2 != 1000)
+ return 2;
+ if (Foo<string>.count3 != 1000)
+ return 3;
+
+ VirtualInterfaceCallFromGenericMethod<long> (f);
+
+ return 0;
+ }
+
+ public static void VirtualInterfaceCallFromGenericMethod <T> (IFoo f) {
+ f.Bar <T> ();
+ }
+