repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[interp] Fall back to old implementation when calling on proxy
[mono-project.git]
/
mcs
/
tests
/
test-async-84.cs
blob
03825613f1f61ac9f4ed86652e5b373750dbf0d0
1
using
System
;
2
using
System
.
Threading
.
Tasks
;
3
4
struct
S
5
{
6
public int value
;
7
public string
str
;
8
}
9
10
public class
Program
11
{
12
async
Task
<
S
>
Foo
()
13
{
14
return new
S
{
15
value
=
1
,
16
str
=
await
DoAsync
()
17
};
18
19
}
20
21
static async
Task
<
string
>
DoAsync
()
22
{
23
await
Task
.
Yield
();
24
return
"asdafs"
;
25
}
26
27
static int
Main
()
28
{
29
var
res
=
new
Program
().
Foo
().
Result
;
30
if
(
res
.
value
!=
1
)
31
return
1
;
32
33
return
0
;
34
}
35
}