-
Notifications
You must be signed in to change notification settings - Fork 6k
Add generic type argument accessibility example to CS0050 documentation #47705
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
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
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.
This is ready for final review.
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
PoliCheck Scan ReportThe following reports lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a comment that you post to the PR. The feedback helps reduce false positive instances in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
The CS0050 compiler error documentation was missing an important case where the error can occur. The issue reported that CS0050 can also be caused when a generic type's type argument has lower accessibility than the method itself.
For example, this code generates CS0050:
The error occurs because
CeisData
is internal but the methodBuildCeis()
is public, making the type argument less accessible than the method.This PR adds:
The documentation now comprehensively covers both the original case (direct return type accessibility) and this additional case involving generic type arguments.
Fixes #31062.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Internal previews