Skip to content

Commit 83d054f

Browse files
[create-pull-request] automated change (#1722)
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
1 parent d19c778 commit 83d054f

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

standard/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,6 @@
261261
- [§11.2.5](patterns.md#1125-positional-pattern) Positional pattern
262262
- [§11.2.6](patterns.md#1126-property-pattern) Property pattern
263263
- [§11.2.7](patterns.md#1127-discard-pattern) Discard pattern
264-
- [§11.3](patterns.md#113-pattern-subsumption) Pattern subsumption
265-
- [§11.4](patterns.md#114-pattern-exhaustiveness) Pattern exhaustiveness
266264
- [§12](expressions.md#12-expressions) Expressions
267265
- [§12.1](expressions.md#121-general) General
268266
- [§12.2](expressions.md#122-expression-classifications) Expression classifications

standard/expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3889,7 +3889,7 @@ If a switch expression is not subject to a *switch expression conversion*, then
38893889
- 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.
38903890
- It is an error if no such type exists.
38913891

3892-
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.
3892+
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.
38933893

38943894
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.
38953895

standard/statements.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ There can be at most one `default` label in a `switch` statement.
753753

754754
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.
755755

756-
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.
756+
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.
757757

758758
> *Example*:
759759
>
@@ -949,7 +949,7 @@ A switch label is reachable if at least one of the following is true:
949949
- The switch’s *selector_expression* is not a constant value and either
950950
- the label is a `case` without a guard or with a guard whose value is not the constant false; or
951951
- it is a `default` label and
952-
- 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
952+
- 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
953953
- 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`.
954954
- The switch label is referenced by a reachable `goto case` or `goto default` statement.
955955
@@ -959,7 +959,7 @@ The end point of a `switch` statement is reachable if the switch statement is re
959959
960960
- The `switch` statement contains a reachable `break` statement that exits the `switch` statement.
961961
- No `default` label is present and either
962-
- 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.
962+
- 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.
963963
- 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`.
964964
- 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.
965965

0 commit comments

Comments
 (0)