linux-packaging-mono/mcs/tests/gtest-variance-4.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

20 lines
312 B
C#

delegate int Foo<in T> (T t);
public class Test
{
public static int Main ()
{
string message = "Hello World!";
Foo<object> foo = (o) => o.GetHashCode ();
if (Bar (foo, message) != message.GetHashCode ())
return 1;
return 0;
}
static int Bar (Foo<string> foo, string s)
{
return foo(s);
}
}