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

35 lines
521 B
C#

using System;
using System.Collections.Generic;
internal delegate void EmptyDelegate ();
class BaseObject
{
public static int Main ()
{
int? i;
Query <BaseObject> (out i);
return 0;
}
static void Closure (EmptyDelegate x)
{
}
static List<T> Query<T> (out int? count) where T : BaseObject
{
count = 0;
List<T> results = new List<T> ();
Closure (delegate {
results.Add (MakeSomething<T> ());
});
return results;
}
static T MakeSomething<T> () where T : BaseObject
{
return null;
}
}