linux-packaging-mono/mcs/tests/test-anon-150.cs

31 lines
395 B
C#
Raw Normal View History

class M
{
public static int Main ()
{
new SomeGenericClass<int>().FailsToCompile ();
return 0;
}
}
class SomeGenericClass<SomeType>
{
object someValue;
delegate void SomeHandlerType ();
void Invoke (SomeHandlerType h)
{
h ();
}
public void FailsToCompile ()
{
Invoke (delegate {
object someObject = 1;
Invoke (delegate {
someValue = someObject;
});
});
}
}