dotnet/roslyn

Simplify logic for deconstruction variables in ExpressionVariableFinder

Open

#15 064 ouverte le 7 nov. 2016

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)C# (4 257 forks)batch import
Area-CompilersConcept-Design DebtFeature - Tupleshelp wanted

Métriques du dépôt

Stars
 (20 414 stars)
Métriques de merge PR
 (Merge moyen 6j 17h) (256 PRs mergées en 30 j)

Description

Per discussion in PR https://github.com/dotnet/roslyn/pull/14871

  • Maybe we don't need MakeOutVariable and MakeDeconstructionVariable, instead one may suffice, by looking up the syntax tree.
  • Maybe we don't need CollectVariablesFromDeconstruction in ExpressionVariableFinder, instead we just need a VisitVariableDesignation which looks up the syntax tree to determine if it is an out or a deconstruction variable.
  • Then maybe we can re-use ExpressionVariableFinder instead of ForEachLoopBinder.CollectLocalsFromDeconstruction.

Guide contributeur