using System.Linq;
class Example
{
public void A()
{
var a = new[] { new[] { 1 } }
.SelectMany(y => y.Select(x => y[x]))
.Select(t => t);
}
}
If lambda argument is closed in one of the lambdas in the LINQ chain, subsequent calls in the chain also indicate the allocation of the closure from the lambda argument, which seems suspicious.
Repro code:
If lambda argument is closed in one of the lambdas in the LINQ chain, subsequent calls in the chain also indicate the allocation of the closure from the lambda argument, which seems suspicious.