-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Update accessibility check for types in same assembly #61082
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
Conversation
| SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, assemblySymbol); | ||
| private bool IsAccessibleType(ISymbol symbol) => | ||
| SymbolEqualityComparer.Default.Equals(symbol.ContainingAssembly, assemblySymbol) | ||
| && (symbol.DeclaredAccessibility == Accessibility.Public || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it simpler to check for != Accessibility.Private? Or are there more accessibility states I'm forgetting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the Accessibility enum is modeled is kinda weird. It does it based on the modifiers in the class so protected class Foo will have Accessibility.Protected even though it is private.
| /// <summary> | ||
| /// No XML comment processed here. | ||
| /// </summary> | ||
| private class Element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this type need to be used somewhere so we can check the lack of description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to rely on the check for compilation errors for this one. Since the type is private, we can't actually use it in the parameter list or return list for a method handler that is internal and/or public.
Closes #61037.
Also uncomments some tests that were commented out due to a bug in Microsoft.OpenApi.