From 06087fcb8eca855f19d55935e04ae9ed6af6d586 Mon Sep 17 00:00:00 2001 From: BillWagner <493969+BillWagner@users.noreply.github.com> Date: Thu, 2 Jul 2026 14:42:52 +0000 Subject: [PATCH] [create-pull-request] automated change --- standard/README.md | 2 -- standard/expressions.md | 2 +- standard/statements.md | 6 +++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/standard/README.md b/standard/README.md index 3fa77487b..3747ebbcc 100644 --- a/standard/README.md +++ b/standard/README.md @@ -261,8 +261,6 @@ - [§11.2.5](patterns.md#1125-positional-pattern) Positional pattern - [§11.2.6](patterns.md#1126-property-pattern) Property pattern - [§11.2.7](patterns.md#1127-discard-pattern) Discard pattern - - [§11.3](patterns.md#113-pattern-subsumption) Pattern subsumption - - [§11.4](patterns.md#114-pattern-exhaustiveness) Pattern exhaustiveness - [§12](expressions.md#12-expressions) Expressions - [§12.1](expressions.md#121-general) General - [§12.2](expressions.md#122-expression-classifications) Expression classifications diff --git a/standard/expressions.md b/standard/expressions.md index 48e8e856b..593fcfb96 100644 --- a/standard/expressions.md +++ b/standard/expressions.md @@ -3889,7 +3889,7 @@ If a switch expression is not subject to a *switch expression conversion*, then - The type of the *switch_expression* is the best common type [§12.6.3.16](expressions.md#126316-finding-the-best-common-type-of-a-set-of-expressions)) of the *switch_expression_arm_expression*s of the *switch_expression_arm*s, if such a type exists, and each *switch_expression_arm_expression* can be implicitly converted to that type. - It is an error if no such type exists. -It is an error if the pattern of any *switch_expression_arm* is *subsumed* by (§11.1) the set of patterns of earlier *unguarded* ([§13.8.3](statements.md#1383-the-switch-statement)) *switch_expression_arm*s of the switch expression. +It is an error if the pattern of any *switch_expression_arm* is *subsumed* by ([§11.1](patterns.md#111-general)) the set of patterns of earlier *unguarded* ([§13.8.3](statements.md#1383-the-switch-statement)) *switch_expression_arm*s of the switch expression. A switch expression is *exhaustive* if every value of its input is handled by at least one arm of the switch expression. A warning may be issued if a switch expression is not exhaustive. diff --git a/standard/statements.md b/standard/statements.md index 455cd83cd..4b808aa77 100644 --- a/standard/statements.md +++ b/standard/statements.md @@ -753,7 +753,7 @@ There can be at most one `default` label in a `switch` statement. It is an error if the pattern of any switch label is not *applicable* ([§11.2.1](patterns.md#1121-general)) to the type of the input expression. -It is an error if the pattern of any switch label is *subsumed* by (§11.1) the set of patterns of earlier *unguarded* switch labels of the switch statement. +It is an error if the pattern of any switch label is *subsumed* by ([§11.1](patterns.md#111-general)) the set of patterns of earlier *unguarded* switch labels of the switch statement. > *Example*: > @@ -949,7 +949,7 @@ A switch label is reachable if at least one of the following is true: - The switch’s *selector_expression* is not a constant value and either - the label is a `case` without a guard or with a guard whose value is not the constant false; or - it is a `default` label and - - the set of patterns appearing among the cases of the switch statement that do not have guards or have guards whose value is the constant true, is not *exhaustive* (§11.1) for the switch governing type; or + - the set of patterns appearing among the cases of the switch statement that do not have guards or have guards whose value is the constant true, is not *exhaustive* ([§11.1](patterns.md#111-general)) for the switch governing type; or - the switch governing type is a nullable type and the set of patterns appearing among the cases of the switch statement that do not have guards or have guards whose value is the constant true does not contain a pattern that would match the value `null`. - The switch label is referenced by a reachable `goto case` or `goto default` statement. @@ -959,7 +959,7 @@ The end point of a `switch` statement is reachable if the switch statement is re - The `switch` statement contains a reachable `break` statement that exits the `switch` statement. - No `default` label is present and either - - The switch’s *selector_expression* is a non-constant value, and the set of patterns appearing among the cases of the switch statement that do not have guards or have guards whose value is the constant true, is not *exhaustive* (§11.1) for the switch governing type. + - The switch’s *selector_expression* is a non-constant value, and the set of patterns appearing among the cases of the switch statement that do not have guards or have guards whose value is the constant true, is not *exhaustive* ([§11.1](patterns.md#111-general)) for the switch governing type. - The switch’s *selector_expression* is a non-constant value of a nullable type, and no pattern appearing among the cases of the switch statement that do not have guards or have guards whose value is the constant true would match the value `null`. - The switch’s *selector_expression* is a constant value and no `case` label without a guard or whose guard is the constant true would match that value.