3 ms·
No, you would be able to support type analysis just as easily because desugaring select x => ... from mylist; into mylist.SelectMany(x => ...); is s
by Joker_vD 3y ago
No, you would be able to support type analysis just as easily because desugaring
select x => ... from mylist;
into
mylist.SelectMany(x => ...);
is straightforward: C# compiler is not expected to be single-pass, it has an AST to operate upon. You'll have a LinqSelectNode with Projection (a lambda expression), Filter, and Source fields which you replace with a new ExtensionMethodCall{ Lhs = origNode.Source, MethodName = "SelectMany", Args = new []Node{ origNode.Projection }), easy.