[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / gtest-variance-8.cs
blobb24be6b2b6b88f8b89861c1eec18ba38ff46e267
1 using System;
3 interface IIn<in T>
7 interface IOut<out T>
11 class A<T> : IIn<T>, IOut<T>
15 class C
17 public static int Main ()
19 IIn<string> a_string = new A<string> ();
20 IIn<object> a_object = new A<object> ();
22 if (!(a_string is IIn<string>))
23 return 1;
25 if ((a_string is IIn<object>))
26 return 2;
28 if (!(a_object is IIn<string>))
29 return 3;
31 if (!(a_object is IIn<object>))
32 return 4;
34 IOut<string> b_string = new A<string> ();
35 IOut<object> b_object = new A<object> ();
37 if (!(b_string is IOut<string>))
38 return 10;
40 if (!(b_string is IOut<object>))
41 return 11;
43 if (b_object is IOut<string>)
44 return 12;
46 if (!(b_object is IOut<object>))
47 return 13;
49 Console.WriteLine ("OK");
50 return 0;