projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #5714 from alexischr/update_bockbuild
[mono.git]
/
mcs
/
tests
/
test-async-34.cs
1
using System;
2
using System.Threading.Tasks;
3
4
class C
5
{
6
static int called;
7
8
public static async Task Test (bool arg)
9
{
10
if (arg)
11
return;
12
13
called++;
14
await Task.FromResult (1);
15
}
16
17
18
public static async Task Test2 (bool arg)
19
{
20
if (arg)
21
return;
22
23
called++;
24
}
25
26
public static int Main ()
27
{
28
Test (true).Wait ();
29
if (called != 0)
30
return 1;
31
32
Test2 (true).Wait ();
33
if (called != 0)
34
return 2;
35
36
return 0;
37
}
38
}