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

41 lines
535 B
C#

using System;
using System.Threading.Tasks;
class C
{
public static void Main ()
{
}
static async void Test_1 ()
{
await RunAsync ();
}
static Task RunAsync ()
{
return Task.Factory.StartNew (
() =>
{
});
}
static async Task<int> Test_2 ()
{
return await RunAsync_2 ();
}
static Task<int> RunAsync_2 ()
{
return Task.Factory.StartNew (() => 2);
}
async Task<bool> Test_3 ()
{
dynamic d = new C ();
d.Value = 3;
d.Value += await Task.Factory.StartNew (() => 2);
return d.Value == 5;
}
}