using System;
using System.Threading.Tasks;
class C
{
void M()
{
Func<Task<int>> f1 = async () => { return foo; }; // correctly generates int
Func<Task<int>> f2 = async () => foo; // generates Task<int>
}
}
If I choose to generate a field in the first lambda, its type will be int. If I do the same inside the second one, the type of the field will be Task<int>, which is wrong.
(very similar to #27647)
If I choose to generate a field in the first lambda, its type will be
int. If I do the same inside the second one, the type of the field will beTask<int>, which is wrong.(very similar to #27647)