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

Add enumconstraint_CSharpKeyword #21207

Merged

Conversation

TheSench
Copy link
Contributor

Summary

This PR adds an f1_keyword for the generic where clause context of the enum keyword. This allows the F1 help to route to this usage of the keyword, rather than always routing to the class declaration page.

Fixes part of #20799, Roslyn changes under dotnet/roslyn#TBD.

@TheSench
Copy link
Contributor Author

This is stemming from this part of #20799:

enum: destination describes declaring an enum.

  • declare an enum type
  • generic constraint where the base type must be an enum (derived from System.Enum)

Is where T : enum now valid, or does it have to be where T : System.Enum? If the new syntax is valid, then this PR requires more work to actually update the document, versus just adding an F1 keyword.

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Thanks @TheSench

This LGTM, and I'll :shipit: now.

@BillWagner BillWagner merged commit 5001510 into dotnet:master Oct 26, 2020
@TheSench TheSench deleted the feature/add-enumconstraint-csharp-keyword branch December 6, 2020 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants