forked fromdotnet/fsharp
- Notifications
You must be signed in to change notification settings - Fork0
Commit1936874
committed
Adjust parser to disallow vertical pipes in active pattern case identifiers.
Related todotnet#78 - without this restriction, the typechecker can't distinguish between valid pipes separating cases and invalid pipes that are embedded in a case identifier. The result is that nonsense like this compiles, when it should not:let (|``Foo|Bar``|) x = match x with | 0 -> Foo | _ -> Barmatch 42 with| Foo -> "foo"| Bar -> "bar" (changeset 1282321)1 parent14f88dd commit1936874
File tree
3 files changed
+14
-2
lines changed- src/fsharp
- tests/fsharpqa/Source/Conformance/PatternMatching/Named
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
478 | 479 | | |
479 | 480 | | |
480 | 481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4159 | 4159 | | |
4160 | 4160 | | |
4161 | 4161 | | |
| 4162 | + | |
4162 | 4163 | | |
4163 | 4164 | | |
4164 | 4165 | | |
| |||
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
0 commit comments
Comments
(0)