Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / tests / gtest-variance-2.cs
1 interface IFoo<in T>
2 {
3         string Bar (T t);
4 }
5
6 class Foo : IFoo<object>
7 {
8         public string Bar (object t)
9         {
10                 return t.GetType ().FullName;
11         }
12 }
13
14 public class Test
15 {
16         public static int Main ()
17         {
18                 IFoo<object> foo = new Foo ();
19                 IFoo<string> foo2 = foo;
20
21                 if (foo2.Bar ("blah") != typeof (string).FullName)
22                         return 1;
23
24                 foo2 = new Foo();
25                 if (foo2.Bar ("blah") != typeof (string).FullName)
26                         return 2;
27                 
28
29                 return 0;
30         }
31 }