Skip to content

SyntaxContexts IsGlobalStatementContext should take file scoped namespaces into consideration #59931

@akhera99

Description

@akhera99

Expected Behavior:

namespace Namespace;
$$
class Program
{
    public async Task MethodAsync()
    {
    }
}

At the cursor location, IsGlobalStatementContext() should be false since it's located within a file-scoped namespace.

Actual Behavior:
IsGlobalStatementContext is true.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions