Skip to content

Commit 28dff23

Browse files
committed
Fix build warnings
New version means lots of new clauses.
1 parent ebf85f5 commit 28dff23

23 files changed

Lines changed: 42 additions & 42 deletions

docs/csharp/language-reference/builtin-types/enum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ For more information, see the following sections of the [C# language specificati
8787

8888
- [Enums](~/_csharpstandard/standard/enums.md)
8989
- [Enum values and operations](~/_csharpstandard/standard/enums.md#206-enum-values-and-operations)
90-
- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#12153-enumeration-logical-operators)
91-
- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#12146-enumeration-comparison-operators)
90+
- [Enumeration logical operators](~/_csharpstandard/standard/expressions.md#12163-enumeration-logical-operators)
91+
- [Enumeration comparison operators](~/_csharpstandard/standard/expressions.md#12156-enumeration-comparison-operators)
9292
- [Explicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1033-explicit-enumeration-conversions)
9393
- [Implicit enumeration conversions](~/_csharpstandard/standard/conversions.md#1024-implicit-enumeration-conversions)
9494

docs/csharp/language-reference/compiler-messages/lambda-expression-errors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ The compiler also produces the following *informational* message:
160160
- **CS8971**: Warning: *InterpolatedStringHandlerArgument has no effect when applied to lambda parameters and will be ignored at the call site.*
161161
- **CS9236**: Informational: *Compiling requires binding the lambda expression at least count times. Consider declaring the lambda expression with explicit parameter types, or if the containing method call is generic, consider using explicit type arguments.*
162162

163-
The compiler prohibits certain C# constructs inside [lambda expressions](../operators/lambda-expressions.md) and [anonymous methods](../operators/delegate-operator.md). These restrictions exist because the compiler transforms lambdas and anonymous methods into [delegate](../../programming-guide/delegates/index.md) invocations or [expression trees](../../advanced-topics/expression-trees/index.md), and some constructs can't be represented in those forms. For more information, see the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the C# specification.
163+
The compiler prohibits certain C# constructs inside [lambda expressions](../operators/lambda-expressions.md) and [anonymous methods](../operators/delegate-operator.md). These restrictions exist because the compiler transforms lambdas and anonymous methods into [delegate](../../programming-guide/delegates/index.md) invocations or [expression trees](../../advanced-topics/expression-trees/index.md), and some constructs can't be represented in those forms. For more information, see the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the C# specification.
164164

165165
You can correct these errors by using the following guidance:
166166

@@ -197,7 +197,7 @@ You can correct these errors by using the following guidance:
197197
- **CS8975**: *The contextual keyword 'var' cannot be used as an explicit lambda return type.*
198198
- **CS9098**: *Implicitly typed lambda parameter '...' cannot have a default value.*
199199

200-
These errors indicate a problem with a [lambda expression parameter](../operators/lambda-expressions.md#input-parameters-of-a-lambda-expression) or return type declaration. For the full rules on lambda parameter and return types, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the C# specification.
200+
These errors indicate a problem with a [lambda expression parameter](../operators/lambda-expressions.md#input-parameters-of-a-lambda-expression) or return type declaration. For the full rules on lambda parameter and return types, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the C# specification.
201201

202202
> [!NOTE]
203203
> **CS1731** and **CS1732** are no longer produced by the current version of the C# compiler (Roslyn). They might appear if you're using an older compiler version.
@@ -228,7 +228,7 @@ You can correct these errors by using the following guidance:
228228
- **CS9099**: Warning: *The default parameter value does not match in the target delegate type.*
229229
- **CS9100**: Warning: *Parameter has params modifier in lambda but not in target delegate type.*
230230

231-
These errors indicate a problem with the [delegate type](../../programming-guide/delegates/index.md) that the compiler infers or expects for a [lambda expression](../operators/lambda-expressions.md), [anonymous method](../operators/delegate-operator.md), or [method group](~/_csharpstandard/standard/conversions.md#108-method-group-conversions). For the full rules on delegate conversions, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1221-anonymous-function-expressions) section of the C# specification.
231+
These errors indicate a problem with the [delegate type](../../programming-guide/delegates/index.md) that the compiler infers or expects for a [lambda expression](../operators/lambda-expressions.md), [anonymous method](../operators/delegate-operator.md), or [method group](~/_csharpstandard/standard/conversions.md#108-method-group-conversions). For the full rules on delegate conversions, see [lambda expressions](../operators/lambda-expressions.md), [anonymous methods](../operators/delegate-operator.md), and the [anonymous function expressions](~/_csharpstandard/standard/expressions.md#1222-anonymous-function-expressions) section of the C# specification.
232232

233233
> [!NOTE]
234234
> The current version of the C# compiler (Roslyn) doesn't produce **CS0467**. You might see this error if you're using an older compiler version.

docs/csharp/language-reference/compiler-messages/overloaded-operator-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ The C# language restricts which types can participate in user-defined conversion
240240
- **CS0217**: *In order to be applicable as a short-circuit operator, a user-defined logical operator must have the same return type as the type of its 2 parameters.*
241241
- **CS0218**: *The type must contain declarations of operator true and operator false.*
242242

243-
The C# language requires specific pairings and signatures for Boolean operators and short-circuit evaluation. For the full rules, see [true and false operators](../operators/true-false-operators.md), [Boolean logical operators](../operators/boolean-logical-operators.md), and [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators) in the C# specification.
243+
The C# language requires specific pairings and signatures for Boolean operators and short-circuit evaluation. For the full rules, see [true and false operators](../operators/true-false-operators.md), [Boolean logical operators](../operators/boolean-logical-operators.md), and [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators) in the C# specification.
244244

245245
- Change the return type of `operator true` and `operator false` to `bool` (**CS0215**). These operators determine whether a value is logically true or false, so the language requires them to return `bool`.
246246
- Define the matching paired operator (**CS0216**). The language requires certain operators to be declared in pairs: `operator ==` with `operator !=`, `operator <` with `operator >`, `operator <=` with `operator >=`, and `operator true` with `operator false`.

docs/csharp/language-reference/keywords/const.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The following example shows how to declare a local constant:
6363
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):
6464

6565
- [Constants](~/_csharpstandard/standard/classes.md#154-constants)
66-
- [Constant expressions](~/_csharpstandard/standard/expressions.md#1225-constant-expressions)
66+
- [Constant expressions](~/_csharpstandard/standard/expressions.md#1226-constant-expressions)
6767

6868
## See also
6969

docs/csharp/language-reference/operators/addition-operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ A user-defined type can [overload](operator-overloading.md) the `+` operator. Wh
7474

7575
## C# language specification
7676

77-
For more information, see the [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) and [Addition operator](~/_csharpstandard/standard/expressions.md#12125-addition-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). For more information on overloading the compound assignment operators in C# 14 and later, see the [user defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification.
77+
For more information, see the [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator) and [Addition operator](~/_csharpstandard/standard/expressions.md#12135-addition-operator) sections of the [C# language specification](~/_csharpstandard/standard/README.md). For more information on overloading the compound assignment operators in C# 14 and later, see the [user defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification.
7878

7979
## See also
8080

docs/csharp/language-reference/operators/arithmetic-operators.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ For the `float` and `double` operands, the result of `x % y` for the finite `x`
140140
> [!NOTE]
141141
> This method of computing the remainder is similar to the method used for integer operands, but it differs from the IEEE 754 specification. If you need the remainder operation that complies with the IEEE 754 specification, use the <xref:System.Math.IEEERemainder*?displayProperty=nameWithType> method.
142142
143-
For information about the behavior of the `%` operator with non-finite operands, see the [Remainder operator](~/_csharpstandard/standard/expressions.md#12124-remainder-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md).
143+
For information about the behavior of the `%` operator with non-finite operands, see the [Remainder operator](~/_csharpstandard/standard/expressions.md#12134-remainder-operator) section of the [C# language specification](~/_csharpstandard/standard/README.md).
144144

145145
For `decimal` operands, the remainder operator `%` works the same as the [remainder operator](<xref:System.Decimal.op_Modulus(System.Decimal,System.Decimal)>) of the <xref:System.Decimal?displayProperty=nameWithType> type.
146146

@@ -289,12 +289,12 @@ For more information, see the following sections of the [C# language specificati
289289
- [Prefix increment and decrement operators](~/_csharpstandard/standard/expressions.md#1297-prefix-increment-and-decrement-operators)
290290
- [Unary plus operator](~/_csharpstandard/standard/expressions.md#1292-unary-plus-operator)
291291
- [Unary minus operator](~/_csharpstandard/standard/expressions.md#1293-unary-minus-operator)
292-
- [Multiplication operator](~/_csharpstandard/standard/expressions.md#12122-multiplication-operator)
293-
- [Division operator](~/_csharpstandard/standard/expressions.md#12123-division-operator)
294-
- [Remainder operator](~/_csharpstandard/standard/expressions.md#12124-remainder-operator)
295-
- [Addition operator](~/_csharpstandard/standard/expressions.md#12125-addition-operator)
296-
- [Subtraction operator](~/_csharpstandard/standard/expressions.md#12126-subtraction-operator)
297-
- [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment)
292+
- [Multiplication operator](~/_csharpstandard/standard/expressions.md#12132-multiplication-operator)
293+
- [Division operator](~/_csharpstandard/standard/expressions.md#12133-division-operator)
294+
- [Remainder operator](~/_csharpstandard/standard/expressions.md#12134-remainder-operator)
295+
- [Addition operator](~/_csharpstandard/standard/expressions.md#12135-addition-operator)
296+
- [Subtraction operator](~/_csharpstandard/standard/expressions.md#12136-subtraction-operator)
297+
- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment)
298298
- [The checked and unchecked operators](~/_csharpstandard/standard/expressions.md#12820-the-checked-and-unchecked-operators)
299299
- [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions)
300300
- [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md)

docs/csharp/language-reference/operators/assignment-operator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ If a user-defined type overloads a binary operator `op`, the `op=` operator, if
8383

8484
## C# language specification
8585

86-
For more information, see the [Assignment operators](~/_csharpstandard/standard/expressions.md#1223-assignment-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification.
86+
For more information, see the [Assignment operators](~/_csharpstandard/standard/expressions.md#1224-assignment-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md) and the [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md) feature specification.
8787

8888
## See also
8989

docs/csharp/language-reference/operators/bitwise-and-shift-operators.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ If a user-defined type `T` overloads the `<<`, `>>`, or `>>>` operator, the type
197197
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):
198198

199199
- [Bitwise complement operator](~/_csharpstandard/standard/expressions.md#1295-bitwise-complement-operator)
200-
- [Shift operators](~/_csharpstandard/standard/expressions.md#1213-shift-operators)
201-
- [Logical operators](~/_csharpstandard/standard/expressions.md#1215-logical-operators)
202-
- [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment)
200+
- [Shift operators](~/_csharpstandard/standard/expressions.md#1214-shift-operators)
201+
- [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators)
202+
- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment)
203203
- [Numeric promotions](~/_csharpstandard/standard/expressions.md#1247-numeric-promotions)
204204
- [Relaxed shift requirements](~/_csharplang/proposals/csharp-11.0/relaxing_shift_operator_requirements.md)
205205
- [Logical right-shift operator](~/_csharplang/proposals/csharp-11.0/unsigned-right-shift-operator.md)

docs/csharp/language-reference/operators/boolean-logical-operators.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,16 @@ For the complete list of C# operators ordered by precedence level, see the [Oper
186186

187187
A user-defined type can [overload](operator-overloading.md) the `!`, `&`, `|`, and `^` operators. When a binary operator is overloaded, the corresponding compound assignment operator is also implicitly overloaded. Beginning with C# 14, a user-defined type can explicitly overload the compound assignment operators to provide a more efficient implementation. Typically, a type overloads these operators because the value can be updated in place, rather than allocating a new instance to hold the result of the binary operation. If a type doesn't provide an explicit overload, the compiler generates the implicit overload.
188188

189-
A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12163-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md).
189+
A user-defined type can't overload the conditional logical operators `&&` and `||`. However, if a user-defined type overloads the [true and false operators](true-false-operators.md) and the `&` or `|` operator in a certain way, the `&&` or `||` operation, respectively, can be evaluated for the operands of that type. For more information, see the [User-defined conditional logical operators](~/_csharpstandard/standard/expressions.md#12173-user-defined-conditional-logical-operators ) section of the [C# language specification](~/_csharpstandard/standard/README.md).
190190

191191
## C# language specification
192192

193193
For more information, see the following sections of the [C# language specification](~/_csharpstandard/standard/README.md):
194194

195195
- [Logical negation operator](~/_csharpstandard/standard/expressions.md#1294-logical-negation-operator)
196-
- [Logical operators](~/_csharpstandard/standard/expressions.md#1215-logical-operators)
197-
- [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1216-conditional-logical-operators)
198-
- [Compound assignment](~/_csharpstandard/standard/expressions.md#12235-compound-assignment)
196+
- [Logical operators](~/_csharpstandard/standard/expressions.md#1216-logical-operators)
197+
- [Conditional logical operators](~/_csharpstandard/standard/expressions.md#1217-conditional-logical-operators)
198+
- [Compound assignment](~/_csharpstandard/standard/expressions.md#12244-compound-assignment)
199199
- [User defined compound assignment](~/_csharplang/proposals/csharp-14.0/user-defined-compound-assignment.md)
200200

201201
## See also

docs/csharp/language-reference/operators/comparison-operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ If you overload one of the `<` or `>` operators, you must overload both `<` and
6767

6868
## C# language specification
6969

70-
For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1214-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md).
70+
For more information, see the [Relational and type-testing operators](~/_csharpstandard/standard/expressions.md#1215-relational-and-type-testing-operators) section of the [C# language specification](~/_csharpstandard/standard/README.md).
7171

7272
## See also
7373

0 commit comments

Comments
 (0)