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

Fix missing duplicate diagnostic for enum declarations #68967

Merged
merged 2 commits into from
Jul 18, 2023

Conversation

RikkiGibson
Copy link
Contributor

Closes #67258

@RikkiGibson RikkiGibson requested a review from a team as a code owner July 10, 2023 22:25
@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 10, 2023
@AlekseyTs
Copy link
Contributor

Done with review pass (commit 1)

// 1.cs(6,26): error CS0102: The type 'C' already contains a definition for 'D'
// public delegate void D();
Diagnostic(ErrorCode.ERR_DuplicateNameInClass, "D").WithArguments("C", "D").WithLocation(6, 26));
}
Copy link
Member

@jcouv jcouv Jul 11, 2023

Choose a reason for hiding this comment

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

Please include the tests I documented in the issue: #67258 (comment) #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I included the one marked TODO2_2, did you also want the scenario marked TODO2 included?

Copy link
Member

Choose a reason for hiding this comment

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

That's good. Thanks

Copy link
Member

Choose a reason for hiding this comment

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

Which test did that end up being? I can't find that scenario (just a partial containing an enum, without any file-local modifier, included twice in the compilation)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From #67258 (comment), TODO2_2 is represented by NonFileLocalEnum_Duplicate. TODO2 is not included.

@jcouv jcouv self-assigned this Jul 11, 2023
Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 2)

@RikkiGibson
Copy link
Contributor Author

@jcouv for a second review

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 2)

@RikkiGibson RikkiGibson requested a review from jcouv July 18, 2023 21:03
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 2)

@jaredpar jaredpar added this to the 17.8 milestone Jul 18, 2023
@RikkiGibson RikkiGibson merged commit e18fda0 into dotnet:main Jul 18, 2023
25 checks passed
@RikkiGibson RikkiGibson deleted the fix-duplicate-enum-error branch July 18, 2023 22:03
@ghost ghost modified the milestones: 17.8, Next Jul 18, 2023
@allisonchou allisonchou modified the milestones: Next, 17.8 P1 Jul 24, 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.

CS7038: Failed to emit module 'name': Unable to determine specific cause of the failure.
5 participants