a632333cc7
Former-commit-id: 6427cc082e74df30afc535fd906a3494b74b0817
35 lines
417 B
C#
35 lines
417 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
struct S
|
|
{
|
|
public int value;
|
|
public string str;
|
|
}
|
|
|
|
public class Program
|
|
{
|
|
async Task<S> Foo ()
|
|
{
|
|
return new S {
|
|
value = 1,
|
|
str = await DoAsync ()
|
|
};
|
|
|
|
}
|
|
|
|
static async Task<string> DoAsync ()
|
|
{
|
|
await Task.Yield ();
|
|
return "asdafs";
|
|
}
|
|
|
|
static int Main ()
|
|
{
|
|
var res = new Program ().Foo ().Result;
|
|
if (res.value != 1)
|
|
return 1;
|
|
|
|
return 0;
|
|
}
|
|
} |