linux-packaging-mono/mcs/tests/test-async-68.cs
Xamarin Public Jenkins c042cd0c52 Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
2015-11-10 15:03:43 +00:00

22 lines
389 B
C#

using System.Threading.Tasks;
class X
{
public async Task ReturnsTaskAsync (Task task)
{
await task;
}
public async Task<Task> ReturnsTaskOfTaskAsync ()
{
var t1 = Task.FromResult (ReturnsTaskAsync (null));
await t1;
Task<Task> t2 = Task.FromResult (ReturnsTaskAsync (null));
return t2;
}
public static void Main ()
{
new X ().ReturnsTaskOfTaskAsync ().Wait ();
}
}