Imported Upstream version 4.6.0.182

Former-commit-id: 439c182e520038bf50777ca2fe684f216ae28552
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-09-01 10:46:18 +00:00
parent c911219690
commit 804b15604f
118 changed files with 1007 additions and 891 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Threading.Tasks;
public class Test
{
static async Task<string> AsyncWithDeepTry ()
{
try {
await Task.Yield ();
try {
await Task.Yield ();
} catch {
}
} catch {
await Task.Yield ();
} finally {
}
return null;
}
static void Main ()
{
AsyncWithDeepTry ().Wait ();
}
}

View File

@@ -0,0 +1,51 @@
using System;
using System.Threading.Tasks;
class X
{
public static void Main ()
{
new X ().Test ();
}
void Test ()
{
object v1 = null;
Action a = () =>
{
if (v1 == null)
{
object v2 = null;
Action a2 = () =>
{
Console.WriteLine (v2);
};
Action a3 = async () =>
{
// This scope needs to access to Scope which can do ldftn on instance method
{
Func<Task> a4 = async () =>
{
await Foo ();
};
}
await Task.Yield ();
};
a3 ();
}
};
a ();
}
async Task Foo ()
{
await Task.FromResult (1);
}
}

View File

@@ -1 +1 @@
c0e3e51ded0d42e24d7370dbaa3dccae45d71340
720ef10c534ff81a6c9296b3f09a50987144d5a9