Skip to content

Conversation

pkulikov
Copy link
Contributor

The unmanaged constraint implies the struct constraint and, thus, doesn't allow nullable value types. Beginning with C# 8.0, for an unmanaged value type T, the nullable type T? is also unmanaged but doesn't satisfy the unmanaged constraint because of the underlying struct constraint. This is how it's now, but may be changed in future. For more information, see dotnet/csharplang#2916

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.

These changes LGTM @pkulikov
I'll :shipit: now.

@BillWagner BillWagner merged commit a798402 into dotnet:master Nov 18, 2019
@pkulikov pkulikov deleted the unmanaged-constraint-tweak branch November 18, 2019 16:12
Youssef1313 pushed a commit to Youssef1313/docs that referenced this pull request Nov 20, 2019
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