Skip to content

Conversation

RexJaeschke
Copy link
Contributor

I think the following text might be affected by this PR (however, I have not included any changes to it in this initial Draft PR.)

15.2.5 Type parameter constraints

The class type, reference type constraint, and secondary constraints can include the nullable type annotation. The presence or absence of this annotation on the type parameter indicates the nullability expectations for the type argument:

  • If the constraint does not include the nullable type annotation, the type argument is expected to be a non-nullable reference type. A compiler may issue a warning if the type argument is a nullable reference type.
  • If the constraint includes the nullable type annotation, the constraint is satisfied by both a non-nullable reference type and a nullable reference type.

@RexJaeschke RexJaeschke added this to the C# 9.0 milestone May 9, 2025
@RexJaeschke RexJaeschke added the type: feature This issue describes a new feature label May 9, 2025
@RexJaeschke RexJaeschke marked this pull request as draft May 9, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature This issue describes a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant