Skip to content

Why are private nested classes included in ref assemblies? #72174

Answered by jaredpar
drewnoakes asked this question in General
Discussion options

You must be logged in to vote

The goal of reference assemblies is that they match the behavior of implementation assemblies exactly from the perspective of compilation. In order to safely exclude a type or member from reference assembly we must be certain that it does not impact evaluation in any way. Unfortunately C# is a very complex language and knowing whether a member does or does not impact semantic analysis can be tricky.

When we first started implementing reference assemblies we approached it in the manner described in this bug: picking specific combinations of accessibility, nesting, etc ... and excluding it. Every time we did this though, another member of the compiler team was able to come up with an exampl…

Replies: 2 comments 14 replies

Comment options

drewnoakes
Feb 20, 2024
Collaborator Author

You must be logged in to vote
3 replies
@CyrusNajmabadi
Comment options

@drewnoakes
Comment options

drewnoakes Feb 20, 2024
Collaborator Author

@CyrusNajmabadi
Comment options

Comment options

You must be logged in to vote
11 replies
@jasonmalinowski
Comment options

@jaredpar
Comment options

@CyrusNajmabadi
Comment options

@drewnoakes
Comment options

drewnoakes Feb 22, 2024
Collaborator Author

@jaredpar
Comment options

Answer selected by jcouv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants