Skip to content

Commit 9fb7fe5

Browse files
authored
Clarify guard behavior for OR patterns (#45606)
1 parent dc071af commit 9fb7fe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/fsharp/language-reference/match-expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ type Union =
6565
| B of int
6666
6767
let foo() =
68-
let test = A 42
68+
let test = A 40
6969
match test with
7070
| A a
7171
| B a when a > 41 -> a // the guard applies to both patterns
7272
| _ -> 1
7373
74-
foo() // returns 42
74+
foo() // returns 1
7575
```
7676

7777
## See also

0 commit comments

Comments
 (0)