From 3207cfde766eedd036806be04ec95b38b0e42281 Mon Sep 17 00:00:00 2001 From: BillWagner <493969+BillWagner@users.noreply.github.com> Date: Fri, 24 Jul 2026 20:52:29 +0000 Subject: [PATCH] [create-pull-request] automated change --- standard/attributes.md | 2 +- standard/classes.md | 14 +++++++------- standard/conversions.md | 2 +- standard/expressions.md | 4 ++-- standard/grammar.md | 2 +- standard/structs.md | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/standard/attributes.md b/standard/attributes.md index ca6472462..113536683 100644 --- a/standard/attributes.md +++ b/standard/attributes.md @@ -1510,7 +1510,7 @@ If an `out bool` parameter is also declared to allow the handler to be inhibited #### 23.5.11.1 The SetsRequiredMembers attribute -This attribute indicates that the constructor it decorates sets all required members for the current type, so callers do not need to set any required members themselves. However, the compiler doesn't verify that the constructor actually initializes all required members. +This attribute indicates that the constructor it decorates sets all required members for the current type, so callers do not need to set any required members themselves. However, the compiler doesn’t verify that the constructor actually initializes all required members. > *Example*: > diff --git a/standard/classes.md b/standard/classes.md index 1cde1e8e1..89c10eb71 100644 --- a/standard/classes.md +++ b/standard/classes.md @@ -6298,7 +6298,7 @@ If a record class is derived directly from `object`, the record class type has a System.Type EqualityContract { get; }; ``` -The property is `private` if the record class type is `sealed`. Otherwise, the property is `virtual` and `protected`. The property may be declared explicitly. It is an error if the explicit declaration does not match the expected signature or accessibility, or if the explicit declaration doesn't allow overriding in a derived type and the record class type is not `sealed`. +The property is `private` if the record class type is `sealed`. Otherwise, the property is `virtual` and `protected`. The property may be declared explicitly. It is an error if the explicit declaration does not match the expected signature or accessibility, or if the explicit declaration doesn’t allow overriding in a derived type and the record class type is not `sealed`. If the record class type is derived from some base record class type `Base`, the record class type includes a provided property declared as follows: @@ -6306,9 +6306,9 @@ If the record class type is derived from some base record class type `Base`, the protected override System.Type EqualityContract { get; }; ``` -The property may be declared explicitly. It is an error if the explicit declaration does not match the expected signature or accessibility, or if the explicit declaration doesn't allow overriding in a derived type and the record class type is not `sealed`. It is an error if either the provided or the explicitly declared property doesn't override a property with this signature in the record class type `Base` (for example, if the property is missing in the `Base`, or is sealed, or is not virtual). The provided property returns `typeof(R)` where `R` is the record class type. +The property may be declared explicitly. It is an error if the explicit declaration does not match the expected signature or accessibility, or if the explicit declaration doesn’t allow overriding in a derived type and the record class type is not `sealed`. It is an error if either the provided or the explicitly declared property doesn’t override a property with this signature in the record class type `Base` (for example, if the property is missing in the `Base`, or is sealed, or is not virtual). The provided property returns `typeof(R)` where `R` is the record class type. -The record class type implements `System.IEquatable` and includes a provided, strongly-typed overload of `Equals(R? other)` where `R` is the record class type. The method is `public`, and the method is `virtual` unless the record class type is `sealed`. The method can be declared explicitly. It is an error if the explicit declaration does not match the expected signature or accessibility, or the explicit declaration doesn't allow overriding in a derived type and the record class type is not `sealed`. +The record class type implements `System.IEquatable` and includes a provided, strongly-typed overload of `Equals(R? other)` where `R` is the record class type. The method is `public`, and the method is `virtual` unless the record class type is `sealed`. The method can be declared explicitly. It is an error if the explicit declaration does not match the expected signature or accessibility, or the explicit declaration doesn’t allow overriding in a derived type and the record class type is not `sealed`. If `Equals(R? other)` is user-defined but `GetHashCode` is not, a warning shall be issued. @@ -6338,7 +6338,7 @@ If the record class type is derived from some base record class type, `Base`, th public sealed override bool Equals(Base? other); ``` -It is an error if the override is declared explicitly. It is an error if the method doesn't override a method with the same signature in record class type `Base` (for example, if the method is missing in the `Base`, or is sealed, or is not virtual). The provided override returns `Equals((object?)other)`. +It is an error if the override is declared explicitly. It is an error if the method doesn’t override a method with the same signature in record class type `Base` (for example, if the method is missing in the `Base`, or is sealed, or is not virtual). The provided override returns `Equals((object?)other)`. The record class type includes a provided override declared as follows: @@ -6346,7 +6346,7 @@ The record class type includes a provided override declared as follows: public override bool Equals(object? obj); ``` -It is an error if the override is declared explicitly. It is an error if the method doesn't override `object.Equals(object? obj)` (for example, due to shadowing in intermediate base types). The provided override returns `Equals(other as R)` where `R` is the record class type. +It is an error if the override is declared explicitly. It is an error if the method doesn’t override `object.Equals(object? obj)` (for example, due to shadowing in intermediate base types). The provided override returns `Equals(other as R)` where `R` is the record class type. The record class type includes a provided override method declared as follows: @@ -6354,7 +6354,7 @@ The record class type includes a provided override method declared as follows: public override int GetHashCode(); ``` -The method may be declared explicitly. It is an error if the explicit declaration doesn't allow overriding it in a derived type and the record class type is not `sealed`. It is an error if either the provided, or the explicitly declared, method doesn't override `object.GetHashCode()` (for example, due to shadowing in intermediate base types). +The method may be declared explicitly. It is an error if the explicit declaration doesn’t allow overriding it in a derived type and the record class type is not `sealed`. It is an error if either the provided, or the explicitly declared, method doesn’t override `object.GetHashCode()` (for example, due to shadowing in intermediate base types). A warning shall be issued if one of `Equals(R?)` and `GetHashCode()` is explicitly declared, but the other is not. @@ -6464,7 +6464,7 @@ A record class type contains two copying members: - A copy constructor ([§15.11.6](classes.md#15116-copy-constructors)) - A provided public, parameter-less, instance clone method having an unspecified reserved name -The copy constructor shall not execute any instance field/property initializers present in the record class declaration. If the constructor is not explicitly declared, it shall be provided by the implementation. If the provided record class is sealed, the constructor shall be private; otherwise; it shall be protected. An explicitly declared copy constructor shall be either public or protected, unless the record class is sealed. The first thing the constructor shall do, is to call a copy constructor of the base class, or a parameter-less `object` constructor if the record inherits from `object`. It is an error for a user-defined copy constructor to use an implicit or explicit *constructor_initializer* that doesn't fulfill this requirement. After a base copy constructor is invoked, a provided copy constructor shall copy values for all instance fields implicitly or explicitly declared within the record class type. The sole presence of a copy constructor, whether explicit or implicit, shall not prevent an automatic addition of a default instance constructor. +The copy constructor shall not execute any instance field/property initializers present in the record class declaration. If the constructor is not explicitly declared, it shall be provided by the implementation. If the provided record class is sealed, the constructor shall be private; otherwise; it shall be protected. An explicitly declared copy constructor shall be either public or protected, unless the record class is sealed. The first thing the constructor shall do, is to call a copy constructor of the base class, or a parameter-less `object` constructor if the record inherits from `object`. It is an error for a user-defined copy constructor to use an implicit or explicit *constructor_initializer* that doesn’t fulfill this requirement. After a base copy constructor is invoked, a provided copy constructor shall copy values for all instance fields implicitly or explicitly declared within the record class type. The sole presence of a copy constructor, whether explicit or implicit, shall not prevent an automatic addition of a default instance constructor. If a virtual clone method is present in the base record class, the provided clone method shall override it, and the return type of the clone method shall be the current containing type if the covariant-returns feature is supported, and the override return type otherwise. It is an error if the base record class clone method is sealed. If a virtual clone method is not present in the base record class, the return type of the clone method shall be the containing type and the method shall be virtual, unless the record class is sealed or abstract. If the containing record class is abstract, the provided clone method shall also be abstract. If the clone method is not abstract, it shall return the result of a call to a copy constructor. diff --git a/standard/conversions.md b/standard/conversions.md index df0eced22..57fea3755 100644 --- a/standard/conversions.md +++ b/standard/conversions.md @@ -146,7 +146,7 @@ An implicit enumeration conversion permits a *constant_expression* ([§12.26](ex ### 10.2.5 Implicit interpolated string conversions -For any type `T` that is an applicable interpolated string handler type ([§23.5.10.1.1](attributes.md#2351011-declaring-a-custom-handler)), there exists an implicit interpolated string handler conversion to `T` from a non-constant *ISE* ([§12.8.3](expressions.md#1283-interpolated-string-expressions)). This conversion exists, regardless of whether errors are found later when attempting to lower the interpolation using the handler pattern. This ensures that there are predictable and useful errors, and that runtime behavior doesn't change based on the content of an interpolated string. +For any type `T` that is an applicable interpolated string handler type ([§23.5.10.1.1](attributes.md#2351011-declaring-a-custom-handler)), there exists an implicit interpolated string handler conversion to `T` from a non-constant *ISE* ([§12.8.3](expressions.md#1283-interpolated-string-expressions)). This conversion exists, regardless of whether errors are found later when attempting to lower the interpolation using the handler pattern. This ensures that there are predictable and useful errors, and that runtime behavior doesn’t change based on the content of an interpolated string. ### 10.2.6 Implicit nullable conversions diff --git a/standard/expressions.md b/standard/expressions.md index 24a22a9f8..6c0effc26 100644 --- a/standard/expressions.md +++ b/standard/expressions.md @@ -5463,7 +5463,7 @@ local_variable_type ; ``` -'scoped' shall only be permitted with *local_variable_type* if *local_variable_type* is 'var' or a ref struct type, and *identifer* is not a discard. +‘scoped’ shall only be permitted with *local_variable_type* if *local_variable_type* is ‘var’ or a ref struct type, and *identifer* is not a discard. The *simple_name* `_` is also considered a declaration expression if simple name lookup did not find an associated declaration ([§12.8.4](expressions.md#1284-simple-names)). When used as a declaration expression, `_` is called a *simple discard*. It is semantically equivalent to `var _`, but is permitted in more places. @@ -5746,7 +5746,7 @@ The behavior of *lambda_expression*s and *anonymous_method_expression*s is the s - *lambda_expression*s permit parameter types to be omitted and inferred whereas *anonymous_method_expression*s require parameter types to be explicitly stated. - The body of a *lambda_expression* can be an expression or a block whereas the body of an *anonymous_method_expression* shall be a block. - Only *lambda_expression*s have conversions to compatible expression tree types ([§8.6](types.md#86-expression-tree-types)). -- Only *lambda_expression* parameters may contain 'scoped'. +- Only *lambda_expression* parameters may contain ‘scoped’. - Only *lambda_expression*s may have *attributes* and explicit return types. The contextual keyword `var` shall not be used as an explicit return type in a *lambda_expression*. diff --git a/standard/grammar.md b/standard/grammar.md index 2849246d5..86cd92140 100644 --- a/standard/grammar.md +++ b/standard/grammar.md @@ -959,6 +959,7 @@ argument_value : expression | 'in' 'scoped'? variable_reference | 'ref' 'scoped'? variable_reference + | 'out' 'scoped'? declaration_expression | 'out' 'scoped'? variable_reference ; @@ -1804,7 +1805,6 @@ compound_assignment compound_assignment_operator : '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '??=' | right_shift_assignment - | unsigned_right_shift_assignment ; // Source: §12.25 Expression diff --git a/standard/structs.md b/standard/structs.md index 3791ae3d6..d49e916ae 100644 --- a/standard/structs.md +++ b/standard/structs.md @@ -1029,7 +1029,7 @@ For the purpose of these rules, a given argument `expr` passed to parameter `p`: A property invocation (either `get` or `set`) is treated as a method invocation of the underlying method by the above rules. -> *Example*: The following illustrates how `scoped` affects the safe-context of a method's return value: +> *Example*: The following illustrates how `scoped` affects the safe-context of a method’s return value: > > > ```csharp @@ -1111,7 +1111,7 @@ The safe-context of a declaration variable from an `out` argument (`M(x, out var - caller-context. - If the out variable is marked `scoped`, then declaration-block (i.e., function-member or narrower). -- If the out variable's type is a `ref struct`, consider all arguments to the containing invocation, including the receiver: +- If the out variable’s type is a `ref struct`, consider all arguments to the containing invocation, including the receiver: - The safe-context of any argument where its corresponding parameter is not `out` and has safe-context of return-only or wider. - The ref-safe-context of any argument where its corresponding parameter has ref-safe-context of return-only or wider.