Open Youssef1313 opened 2 years ago
I would support this. But it's worht a discussion. These guys are very funky in that they really can declare entirely fresh symbols (Esp. now with the work for lambda defaults and whatnot), but you have to do GetSymbolInfo on them. The latter does makes sense as these are also expressions though.
Generally speaking though, this divergence has always been odd on the IDE side. We generally have had to constantly special case these guys, rather than uniformly going through GetDeclaredSymbol. It has felt weird that virtually all other type/member symbols that come from something in source use a one mechanism, but these use another.
I'm curious what compiler thinks though. That said, i'm guessing IDE is more the primary consumer of these APIs, so maybe we defer more to that need?
Background and Motivation
The node kinds
SyntaxKind.AnonymousMethodExpression
,SyntaxKind.ParenthesizedLambdaExpression
, andSyntaxKind.SimpleLambdaExpression
declares lambda symbols, but not supported byGetDeclaredSymbol
Proposed API
There will be parallel changes to VB.
Usage Examples
Alternative Designs
Risks