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

39 lines
396 B
C#

using System;
class C<T> where T : C<T>
{
public static void Foo<U> (U arg) where U : C<U>, new ()
{
var i = new U ();
{
var ii = new U ();
Func<U> f = () => i;
{
Action a = () => C<U>.Run (ii);
a ();
}
f ();
}
}
static void Run (T a)
{
}
}
class D : C<D>
{
}
class E : C<E>
{
}
class A
{
public static int Main ()
{
D.Foo (new E ());
return 0;
}
}