Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This message is given when pattern matching is incomplete.
Given the following definition:
type Faucet =
| Hot
| Cold
let faucet = Hot
And match expression:
let incompleteFaucetString =
match faucet with
| Hot -> "Hot"
The compiler will yield the following message:
FS0025: Incomplete pattern matches on this expression. For example, the value 'Cold' may indicate a case not covered by the pattern(s).
To resolve, you can either complete the pattern match:
let completeFaucetString =
match faucet with
| Hot -> "Hot"
| Cold -> "Cold"
Or, introduce a wildcard, _
(use with caution)
let wildcardFaucetString =
match faucet with
| Hot -> "Hot"
| _ -> "Other"
.NET feedback
.NET is an open source project. Select a link to provide feedback: