Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow File-local type to shadow a namespace declaration in a different file #69254

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

RikkiGibson
Copy link
Contributor

Closes #68429

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 27, 2023
@RikkiGibson RikkiGibson force-pushed the file-type-shadow-namespace branch from d57cc53 to 3a4d110 Compare July 27, 2023 17:12
@RikkiGibson RikkiGibson marked this pull request as ready for review July 27, 2023 17:26
@RikkiGibson RikkiGibson requested a review from a team as a code owner July 27, 2023 17:26
// (3,16): error CS9071: The namespace 'App' already contains a definition for 'Widget' in this file.
// file class Widget { }
Diagnostic(ErrorCode.ERR_FileLocalDuplicateNameInNS, "Widget").WithArguments("Widget", "App").WithLocation(3, 16));
}
Copy link
Member

@cston cston Jul 28, 2023

Choose a reason for hiding this comment

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

}

Consider also testing these same files, but where source1 is in a separate compilation: testing as a compilation reference and testing as a metadata reference.

@jcouv jcouv self-assigned this Jul 28, 2023
@jcouv jcouv added this to the 17.8 milestone Jul 28, 2023
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

Done with review pass (iteration 1). Only minor comment to consider

@RikkiGibson RikkiGibson requested a review from jcouv July 28, 2023 19:24
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 3)

@RikkiGibson RikkiGibson merged commit f5b6c71 into dotnet:main Jul 28, 2023
@ghost ghost modified the milestones: 17.8, Next Jul 28, 2023
@dibarbet dibarbet modified the milestones: Next, 17.8 P2 Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File-local type doesn't "shadow" namespaces
4 participants