Fix analysis of conjunctive patterns for exhaustiveness
The analysis of conjunctive patterns pat & pat has problems.
- https://github.com/dotnet/fsharp/issues/1281
- https://github.com/dotnet/fsharp/issues/3294
This is a first look at fixing this - it will need some care and careful review but let's first see if this causes any problems.
Improving the pattern matching in conjunction with AP would be really nice . I have hit some of above limitation, making hard to grasp for a newcomer
This probably needs a bunch of tests, from the linked issues.
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
This probably needs a bunch of tests, from the linked issues.
I did add some unites locally and it seems that only the second issue on the list is fixed. The first one still show a warning "This rule will never be matched"
Happy to raise a PR to Don's fork with the unit tests :)
@edgarfgp Thank you so much for checking! I've checked too and it seems both are fixed - with the first issue, two warnings were being generated - one for incomplete matching, and one for "never matched". The second is correct to emit, the first is not.
I've added testing for both test cases.
@vzarytovskii This is ready
@dsyme Thanks for fixing this . I use AP and this will make the experience much better
@vzarytovskii This seems to be ready and the CI timed out. Would be awesome to have this in :)