summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0126-3.cs
blob: 5d0052d776ef0b75020d0b8513aa80ff52f32f70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// CS0126: An object of a type convertible to `int' is required for the return statement
// Line: 15

using System.Threading.Tasks;

class MainClass
{
    public static void Main ()
    {
        Task<C> v = null;

        Task.Run (async () => {
            await Task.Yield ();
            if (v == null) {
                return;
            }

            return 1;
        });
    }
}

public class C
{
    string Id { get; set; }
}