You've already forked linux-packaging-mono
Imported Upstream version 4.4.0.40
Former-commit-id: 6427cc082e74df30afc535fd906a3494b74b0817
This commit is contained in:
30
mcs/tests/test-async-82.cs
Normal file
30
mcs/tests/test-async-82.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
class X
|
||||
{
|
||||
public static int Main ()
|
||||
{
|
||||
if (new X ().Test (false).Result != true)
|
||||
return 1;
|
||||
|
||||
if (new X ().Test (true).Result != true)
|
||||
return 2;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public async Task<bool> Test(bool TrueOrFalse)
|
||||
{
|
||||
if (TrueOrFalse)
|
||||
return true;
|
||||
|
||||
try {
|
||||
return true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Task.Yield ();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user