eol
[mcs.git] / tests / gtest-variance-4.cs
blob00befb9f343b9b2bdacfe4b3afdc07a46eba7549
1 // Compiler options: -langversion:future
3 delegate int Foo<in T> (T t);
5 public class Test
7 static int Main ()
9 string message = "Hello World!";
10 Foo<object> foo = (o) => o.GetHashCode ();
11 if (Bar (foo, message) != message.GetHashCode ())
12 return 1;
14 return 0;
17 static int Bar (Foo<string> foo, string s)
19 return foo(s);