dotnet/roslyn

Simplify logic for deconstruction variables in ExpressionVariableFinder

オープン

#15,064 opened on 2016/11/07

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C# (4,257 件のフォーク)batch import
Area-CompilersConcept-Design DebtFeature - Tupleshelp wanted

Repository metrics

Stars
 (20,414 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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.

コントリビューターガイド