Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@ -0,0 +1,44 @@
using System;
using System.Threading.Tasks;
public class Test
{
public static int Main()
{
var t = new Test ();
t.Entry().Wait();
if (t.caughtCounter != 1)
return 1;
return 0;
}
int caughtCounter;
async Task Entry()
{
for (int i = 0; i < 5; ++i) {
try {
var result = Func(i);
Console.WriteLine($"{i} result {result}");
} catch (Exception e) {
await Nothing();
Console.WriteLine($"{i} caught");
++caughtCounter;
}
}
}
bool Func(int i)
{
if (i == 0) {
throw new Exception();
} else {
return true;
}
}
async Task Nothing()
{
}
}