Open Thorium opened 7 years ago
I'd say this should be fairly easy to achieve when you don't have any clauses typed out yet. Finding out the missing cases can otherwise be very tricky, what with active patterns, when guards, subpatterns... Yes, the compiler will (always?) give you an example of something that's not covered, but I'm not sure it's viable for it to provide an exhaustive list of missing cases.
Good point @kerams. We could probably have this only for simple cases like type DU = | A | B | C
.
Suggestion to code editor quick fixes:
When matching over enum or discriminated union type, and gotten warning "Incomplete pattern matches", provide a quick hint fix possibility to add missing enums.