Commit c4a9f34
authored
Handle active patterns with inferred function ty & unsolved range typar (#18642)
* Add test for active pattern w/fun ty w/unsolved range typar
* Treat `(|P|) : 'a -> 'b` similarly to `(|P|) : 'a`
That is, for an active pattern whose type is known to be a function type
but whose range type is not yet solved, assume that it _could_ be solved
to, e.g., another function type. This can show up in, e.g., an active
pattern that is defined mutually-recursively with `and`, has no type
annotations, and returns a lambda with `fun` or `function`.
* Update release notes1 parent 573191b commit c4a9f34
File tree
3 files changed
+25
-1
lines changed- docs/release-notes/.FSharp.Compiler.Service
- src/Compiler/Checking/Expressions
- tests/FSharp.Compiler.ComponentTests/ErrorMessages
3 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5259 | 5259 | | |
5260 | 5260 | | |
5261 | 5261 | | |
| 5262 | + | |
| 5263 | + | |
5262 | 5264 | | |
5263 | 5265 | | |
5264 | 5266 | | |
| |||
5281 | 5283 | | |
5282 | 5284 | | |
5283 | 5285 | | |
5284 | | - | |
| 5286 | + | |
| 5287 | + | |
5285 | 5288 | | |
5286 | 5289 | | |
5287 | 5290 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
764 | 784 | | |
765 | 785 | | |
766 | 786 | | |
| |||
0 commit comments