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,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);
}
}