-- If any *type_parameter_constraints_clause*s are present, each of their *type_parameter_constraints* shall be `class` or `struct`, and for the constraint `class` in the override shall correspond to a type parameter in the base method that is known to be a non-nullable reference type. Any type parameter that has the `struct` constraint in the override shall correspond to a type parameter in the base method that is known to be a non-nullable value type. In the absence of *type_parameter_constraints_clause*s, the constraints are inherited from the overridden base method, and for the constraint `struct` a parameter type `T?` is interpreted as `System.Nullable<T>`. Constraints that are type parameters in the overridden method may be replaced by type arguments in the inherited constraint. This can lead to constraints that are not valid when explicitly specified, such as value types or sealed types.
0 commit comments