Skip to content

Add f1-keyword for class used as generic type constraint#21037

Merged
BillWagner merged 2 commits intodotnet:masterfrom
TheSench:feature/disambiguate-f1-help-for-class-keyword
Oct 13, 2020
Merged

Add f1-keyword for class used as generic type constraint#21037
BillWagner merged 2 commits intodotnet:masterfrom
TheSench:feature/disambiguate-f1-help-for-class-keyword

Conversation

@TheSench
Copy link
Contributor

@TheSench TheSench commented Oct 12, 2020

Summary

This PR adds an f1_keyword for the generic where clause context of the class 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#48506.

Alternative Solution

This PR is unnecessary if the existing whereconstraint_CSharpKeyword keyword can be used by Roslyn for this context.

@BillWagner
Copy link
Member

@TheSench This change looks good to me.

is there are related roslyn PR to reference? /cc @davidwengier

@TheSench
Copy link
Contributor Author

@TheSench This change looks good to me.

is there are related roslyn PR to reference? /cc @davidwengier

Yes, it should be linked in the initial comment, but here it is for reference:
dotnet/roslyn#48506

@TheSench
Copy link
Contributor Author

I've started discussion on the necessity of this change versus using the existing whereconstraint_CSharpKeyword. I think this change may still be needed (and if so, an additional one for struct must be added).

@TheSench
Copy link
Contributor Author

I've started discussion on the necessity of this change versus using the existing whereconstraint_CSharpKeyword. I think this change may still be needed (and if so, an additional one for struct must be added).

Since this PR is either completely unnecessary, or new keywords are needed for both class and struct, I've gone ahead and added structcontraint to this PR.

@BillWagner
Copy link
Member

Thanks @TheSench

This LGTM as well. I'll :shipit: now.

@BillWagner BillWagner merged commit 6eaccee into dotnet:master Oct 13, 2020
BillWagner added a commit that referenced this pull request Oct 14, 2020
* Respond to feedback for deserialization constructors (#21051)

* Fixes #20949. (#21052)

* Add f1-keyword for `class` used as generic type constraint (#21037)

* Add f1-keyword for `class` used as generic type constraint

* Add structconstraint

* Update CS0267 message and simplify example (#21047)

* Update CS0267 message and simplify example

* Update ms.date

* Added a link (#21058)

* Fixes #20958. (#21054)

* fix the source path for retired C# 7.x content (#21059)

The "whats-new" folder was missing.

* Removing redundant pipe character (#20931)

* Update single-file.md (#20925)

update ReadyToRun link now that we have the docs for it.

* Remove statement about TLS 1.3 for .NET Core 3.0 (#20922)

I think, TLS 1.3 won't be supported by .NET Core 3.0 since it's out of support and the implementation is coming with .NET 5, as stated in [Transport Layer Security (TLS) best practices with the .NET Framework](#4675 (comment)).

This info should be removed, so we have no misleading information out there... 😉

* SslStream/NegotiateStream breaking change (#20979)

* Add workload and app model to glossary (#21046)

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>

* Breaking change for key-value pair serialization (#21050)

* Update .NET Standard overview for .NET 5 (#20955)

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>

* Update get-started-vscode.md (#21072)

http to https after verifying link

Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Jon Senchyna <TheSench@users.noreply.github.com>
Co-authored-by: Youssef Victor <31348972+Youssef1313@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: William Whitwell Bailey <45574209+willwhitwellbailey@users.noreply.github.com>
Co-authored-by: Lakshan Fernando <lakshanf@hotmail.com>
Co-authored-by: kapsiR <kapsiR@users.noreply.github.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Co-authored-by: icyfire0573 <40814526+icyfire0573@users.noreply.github.com>
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.

4 participants