File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/PowerShellEditorServices/Services/Symbols Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ private AstVisitAction AddReference(SymbolReference symbol)
93
93
return existing ;
94
94
} ) ;
95
95
96
- return symbol . SymbolType is SymbolType . Parameter
97
- ? AstVisitAction . SkipChildren : AstVisitAction . Continue ;
96
+ return AstVisitAction . Continue ;
98
97
}
99
98
}
Original file line number Diff line number Diff line change @@ -85,6 +85,13 @@ public override AstVisitAction VisitParameter(ParameterAst parameterAst)
85
85
86
86
public override AstVisitAction VisitVariableExpression ( VariableExpressionAst variableExpressionAst )
87
87
{
88
+ // Parameters are visited earlier, and we don't want to skip their children because we do
89
+ // want to visit their type constraints.
90
+ if ( variableExpressionAst . Parent is ParameterAst )
91
+ {
92
+ return AstVisitAction . Continue ;
93
+ }
94
+
88
95
// TODO: Consider tracking unscoped variable references only when they declared within
89
96
// the same function definition.
90
97
return _action ( new SymbolReference (
You can’t perform that action at this time.
0 commit comments