Skip to content

Conversation

dibarbet
Copy link
Member

Resolves dotnet/vscode-csharp#6767

I am open to other ideas on how to render the top level entry point. For now I just used the display name, which should match what other places like diagnostics may report. Potentially could not include it at all, or name it something else?

In VSCode:
image

In VS, we only show max 2 levels, so the only change is that the top level program entry point can be seen, instead of it being blank:
image

@dibarbet dibarbet requested a review from CyrusNajmabadi May 16, 2025 01:54
@dibarbet dibarbet requested a review from a team as a code owner May 16, 2025 01:54
foreach (var localFunction in node.DescendantNodes().Where(CSharpSyntaxFacts.Instance.IsLocalFunctionStatement))
{
var localFunctionSymbol = semanticModel.GetDeclaredSymbol(localFunction, cancellationToken);
// Check to make sure we only include local functions that are directly contained in the current member.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels n^2 how you have things now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it possibly was. I adjusted the implementation and should only check each local function once

@CyrusNajmabadi
Copy link
Member

Can you add tests inside a prop accessor. I want to make sure we don't hit the local function multiple times.

@dibarbet
Copy link
Member Author

Can you add tests inside a prop accessor. I want to make sure we don't hit the local function multiple times.

good test case, added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breadcrumbs do not include local functions
3 participants