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.

@dibarbet dibarbet merged commit 873ad37 into dotnet:main May 19, 2025
25 checks passed
@dibarbet dibarbet deleted the local_navbar branch May 19, 2025 19:54
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone May 19, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Copilot AI added a commit that referenced this pull request Oct 20, 2025
Updated all WorkItem attributes in the BaseType tests to point to the correct issue #41733 instead of #78605.

Co-authored-by: CyrusNajmabadi <4564579+CyrusNajmabadi@users.noreply.github.com>
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