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

20 lines
293 B
C#

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