Skip to content

Calculate containing type effective accessibility for required member enforcement#61643

Merged
333fred merged 4 commits intodotnet:mainfrom
333fred:main
Jun 14, 2022
Merged

Calculate containing type effective accessibility for required member enforcement#61643
333fred merged 4 commits intodotnet:mainfrom
333fred:main

Conversation

@333fred
Copy link
Copy Markdown
Member

@333fred 333fred commented Jun 1, 2022

Implements the spec change in dotnet/csharplang#6190. Fixes #61527 and #61528.

@333fred 333fred requested a review from a team as a code owner June 1, 2022 23:02
@ghost ghost added the Area-Compilers label Jun 1, 2022
@333fred 333fred added the Feature - Required Members Required properties and fields label Jun 1, 2022
@Youssef1313
Copy link
Copy Markdown
Member

Can IsAtLeastAsVisibleAs be used and maintain the same intended behavior?

@333fred
Copy link
Copy Markdown
Member Author

333fred commented Jun 2, 2022

No, that helper is about relating type symbol visibility. We need to calculate the minimum required visibility for a member.

@AlekseyTs
Copy link
Copy Markdown
Contributor

Done with review pass (commit 1), tests are just glanced over.

@333fred
Copy link
Copy Markdown
Member Author

333fred commented Jun 2, 2022

@AlekseyTs please take another look.

@AlekseyTs
Copy link
Copy Markdown
Contributor

Done with review pass (commit 2)

@AlekseyTs
Copy link
Copy Markdown
Contributor

Done with review pass (commit 3)

@333fred
Copy link
Copy Markdown
Member Author

333fred commented Jun 13, 2022

@AlekseyTs please take another look.

Copy link
Copy Markdown
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 4)

@333fred
Copy link
Copy Markdown
Member Author

333fred commented Jun 13, 2022

@dotnet/roslyn-compiler for a second review please.

@333fred
Copy link
Copy Markdown
Member Author

333fred commented Jun 14, 2022

https://github.com/orgs/dotnet/teams/roslyn-compiler for a second review please.

@jcouv jcouv self-assigned this Jun 14, 2022
Copy link
Copy Markdown
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 4)

@333fred 333fred merged commit e7a1a08 into dotnet:main Jun 14, 2022
@ghost ghost added this to the Next milestone Jun 14, 2022
@RikkiGibson RikkiGibson modified the milestones: Next, 17.3 P3 Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Feature - Required Members Required properties and fields

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive error CS9503 "Required member cannot be less visible than the containing type" for member in nested type

5 participants