Skip to content

C# 7.x: enhanced generic constraints #244

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

Merged
merged 10 commits into from
Feb 3, 2023

Conversation

RexJaeschke
Copy link
Contributor

Add support for the following kinds of primary constraints: unmanaged, System.Enum, and System.Delegate.

@RexJaeschke RexJaeschke added this to the C# 7.x milestone Mar 17, 2021
@RexJaeschke RexJaeschke requested a review from BillWagner March 17, 2021 14:43
@RexJaeschke RexJaeschke added the Review: pending Proposal is available for review label Sep 16, 2021
@BillWagner BillWagner marked this pull request as draft February 3, 2022 15:13
@BillWagner
Copy link
Member

converting to draft: C# 7 feature

@BillWagner BillWagner force-pushed the Rex-v7-enhanced-generic-constraints branch from 35805a1 to a388043 Compare April 3, 2022 19:14
Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

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

A few things to look at, the consistency in approach/description being a key one.

RexJaeschke and others added 4 commits October 2, 2022 17:50
@BillWagner BillWagner force-pushed the Rex-v7-enhanced-generic-constraints branch from 7e5894b to c010892 Compare October 2, 2022 21:50
@BillWagner BillWagner marked this pull request as ready for review October 5, 2022 22:19
@jskeet jskeet self-assigned this Jan 23, 2023
Copy link
Contributor

@jskeet jskeet left a comment

Choose a reason for hiding this comment

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

Another one that could do with discussion at the meeting, I think.

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

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

I've thumbed up Jon's suggestions, made my previous suggestion into a formal one (which took me 4 suggestions, couldn't figure out how to do a single multiline one), and added a new one to avoid repetition.

If the re-wording suggestion is adopted then unamanaged needs to be added to contextual_keyword in §6.4.4 Keywords

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.

Add one set of typos to fix.

@BillWagner
Copy link
Member

@Nigel-Ecma Can you approve the changes on this PR? I think Rex and I have addressed all your comments, or accepted your suggesitons.

Remove V6-specific entries, and add first new V7 items.
@RexJaeschke
Copy link
Contributor Author

Per Nigel's request, add unmanaged to contextual_keyword in 6.4.4.

Copy link
Contributor

@Nigel-Ecma Nigel-Ecma left a comment

Choose a reason for hiding this comment

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

looks good :-)

@RexJaeschke RexJaeschke merged commit e41690c into draft-v7 Feb 3, 2023
@RexJaeschke RexJaeschke deleted the Rex-v7-enhanced-generic-constraints branch February 3, 2023 21:54
BillWagner added a commit to BillWagner/docs that referenced this pull request Feb 5, 2023
see dotnet/csharpstandard#244

The standard draft language has been updated to add the `unmanaged` generic constraint. Remove the feature speclet from the docs site.
IEvangelist pushed a commit to dotnet/docs that referenced this pull request Feb 6, 2023
see dotnet/csharpstandard#244

The standard draft language has been updated to add the `unmanaged` generic constraint. Remove the feature speclet from the docs site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review: pending Proposal is available for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants