c042cd0c52
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
22 lines
389 B
C#
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 ();
|
|
}
|
|
} |