Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/CSharp.Workspaces/CSharp/FindSymbols/LocalSymbolFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Expand Down Expand Up @@ -102,6 +103,15 @@ public static ImmutableArray<ISymbol> FindLocalSymbols(
walker.Visit(declaration.BodyOrExpressionBody());
break;
}
case SyntaxKind.CompilationUnit:
{
var declaration = (CompilationUnitSyntax)node;
foreach (GlobalStatementSyntax globalStatement in declaration.Members.OfType<GlobalStatementSyntax>())
{
walker.Visit(globalStatement);
}
break;
}
case SyntaxKind.Parameter:
case SyntaxKind.RecordDeclaration:
{
Expand Down
2 changes: 1 addition & 1 deletion src/Workspaces.Core/Rename/SymbolListHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static List<ISymbol> SortAndFilterMemberSymbols(IEnumerable<ISymbol> symb
results.Add(symbol);

results.AddRange(methodSymbol.TypeParameters);
results.AddRange(methodSymbol.Parameters);
results.AddRange(methodSymbol.Parameters.Where(ms => !ms.IsImplicitlyDeclared));
}
else
{
Expand Down
Loading