Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
BillWagner authored Oct 3, 2024
1 parent a23bd55 commit 592b69b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions standard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,8 @@
- [§10.3.5](conversions.md#1035-explicit-reference-conversions) Explicit reference conversions
- [§10.3.6](conversions.md#1036-explicit-tuple-conversions) Explicit tuple conversions
- [§10.3.7](conversions.md#1037-unboxing-conversions) Unboxing conversions
- [§10.3.8](conversions.md#1038-explicit-dynamic-conversions) Explicit dynamic conversions
- [§10.3.9](conversions.md#1039-explicit-conversions-involving-type-parameters) Explicit conversions involving type parameters
- [§10.3.10](conversions.md#10310-user-defined-explicit-conversions) User-defined explicit conversions
- [§10.3.8](conversions.md#1038-explicit-conversions-involving-type-parameters) Explicit conversions involving type parameters
- [§10.3.9](conversions.md#1039-user-defined-explicit-conversions) User-defined explicit conversions
- [§10.4](conversions.md#104-standard-conversions) Standard conversions
- [§10.4.1](conversions.md#1041-general) General
- [§10.4.2](conversions.md#1042-standard-implicit-conversions) Standard implicit conversions
Expand Down
12 changes: 6 additions & 6 deletions standard/conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ The following conversions are classified as explicit conversions:
- Explicit reference conversions ([§10.3.5](conversions.md#1035-explicit-reference-conversions))
- Explicit interface conversions
- Unboxing conversions ([§10.3.7](conversions.md#1037-unboxing-conversions))
- Explicit type parameter conversions ([§10.3.9](conversions.md#1039-explicit-conversions-involving-type-parameters))
- User-defined explicit conversions ([§10.3.10](conversions.md#10310-user-defined-explicit-conversions))
- Explicit type parameter conversions ([§10.3.8](conversions.md#1038-explicit-conversions-involving-type-parameters))
- User-defined explicit conversions ([§10.3.9](conversions.md#1039-user-defined-explicit-conversions))
Explicit conversions can occur in cast expressions ([§12.9.7](expressions.md#1297-cast-expressions)).
Expand Down Expand Up @@ -487,7 +487,7 @@ The explicit reference conversions are:
- If `Xᵢ` is invariant, then `Sᵢ` is identical to `Tᵢ`.
- If `Xᵢ` is covariant, then there is an identity conversion, implicit reference conversion or explicit reference conversion from `Sᵢ` to `Tᵢ`.
- If `Xᵢ` is contravariant, then `Sᵢ` and `Tᵢ` are either identical or both reference types.
- Explicit conversions involving type parameters that are known to be reference types. For more details on explicit conversions involving type parameters, see [§10.3.9](conversions.md#1039-explicit-conversions-involving-type-parameters).
- Explicit conversions involving type parameters that are known to be reference types. For more details on explicit conversions involving type parameters, see [§10.3.8](conversions.md#1038-explicit-conversions-involving-type-parameters).
The explicit reference conversions are those conversions between *reference_type*s that require run-time checks to ensure they are correct.
Expand All @@ -510,7 +510,7 @@ An unboxing conversion permits a *reference_type* to be explicitly converted to
- From any *interface_type* `I` to any *non_nullable_value_type* where there is an unboxing conversion from an *interface_type* `I₀` to the *non_nullable_value-type* and an identity conversion from `I` to `I₀`.
- From any *interface_type* `I` to any *non_nullable_value_type* where there is an unboxing conversion from an *interface_type* `I₀` to the *non_nullable_value_type* and either either `I₀` is variance_convertible to `I` or `I` is variance-convertible to `I₀` ([§18.2.3.3](interfaces.md#18233-variance-conversion)).
- From any *reference_type* to any *nullable_value_type* where there is an unboxing conversion from *reference_type* to the underlying *non_nullable_value_type* of the *nullable_value_type*.
- From a type parameter which is not known to be a value type to any type such that the conversion is permitted by [§10.3.9](conversions.md#1039-explicit-conversions-involving-type-parameters).
- From a type parameter which is not known to be a value type to any type such that the conversion is permitted by [§10.3.8](conversions.md#1038-explicit-conversions-involving-type-parameters).
An unboxing operation to a *non_nullable_value_type* consists of first checking that the object instance is a boxed value of the given *non_nullable_value_type*, and then copying the value out of the instance.
Expand Down Expand Up @@ -538,7 +538,7 @@ For an unboxing conversion to a given *non_nullable_value_type* to succeed at ru
For an unboxing conversion to a given *nullable_value_type* to succeed at run-time, the value of the source operand shall be either null or a reference to a boxed value of the underlying *non_nullable_value_type* of the *nullable_value_type*. If the source operand is a reference to an incompatible object, a `System.InvalidCastException` is thrown.
### 10.3.9 Explicit conversions involving type parameters
### 10.3.8 Explicit conversions involving type parameters
For a *type_parameter* `T` that is known to be a reference type ([§15.2.5](classes.md#1525-type-parameter-constraints)), the following explicit reference conversions ([§10.3.5](conversions.md#1035-explicit-reference-conversions)) exist:
Expand Down Expand Up @@ -593,7 +593,7 @@ The above rules do not permit a direct explicit conversion from an unconstrained
>
> *end example*
### 10.3.10 User-defined explicit conversions
### 10.3.9 User-defined explicit conversions
A user-defined explicit conversion consists of an optional standard explicit conversion, followed by execution of a user-defined implicit or explicit conversion operator, followed by another optional standard explicit conversion. The exact rules for evaluating user-defined explicit conversions are described in10.5.5](conversions.md#1055-user-defined-explicit-conversions).
Expand Down
2 changes: 1 addition & 1 deletion standard/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ Since a type parameter can be instantiated with many different type arguments, t
>
> - A type parameter cannot be used directly to declare a base class ([§15.2.4.2](classes.md#15242-base-classes)) or interface ([§18.2.4](interfaces.md#1824-base-interfaces)).
> - The rules for member lookup on type parameters depend on the constraints, if any, applied to the type parameter. They are detailed in [§12.5](expressions.md#125-member-lookup).
> - The available conversions for a type parameter depend on the constraints, if any, applied to the type parameter. They are detailed in [§10.2.12](conversions.md#10212-implicit-conversions-involving-type-parameters) and [§10.3.9](conversions.md#1039-explicit-conversions-involving-type-parameters).
> - The available conversions for a type parameter depend on the constraints, if any, applied to the type parameter. They are detailed in [§10.2.12](conversions.md#10212-implicit-conversions-involving-type-parameters) and [§10.3.8](conversions.md#1038-explicit-conversions-involving-type-parameters).
> - The literal `null` cannot be converted to a type given by a type parameter, except if the type parameter is known to be a reference type ([§10.2.12](conversions.md#10212-implicit-conversions-involving-type-parameters)). However, a default expression ([§12.8.20](expressions.md#12820-default-value-expressions)) can be used instead. In addition, a value with a type given by a type parameter *can* be compared with null using `==` and `!=` ([§12.12.7](expressions.md#12127-reference-type-equality-operators)) unless the type parameter has the value type constraint.
> - A `new` expression ([§12.8.16.2](expressions.md#128162-object-creation-expressions)) can only be used with a type parameter if the type parameter is constrained by a *constructor_constraint* or the value type constraint ([§15.2.5](classes.md#1525-type-parameter-constraints)).
> - A type parameter cannot be used anywhere within an attribute.
Expand Down

0 comments on commit 592b69b

Please sign in to comment.