Created
March 29, 2022 23:28
-
-
Save jcmrva/df485092f9b0114845d48523f56f8101 to your computer and use it in GitHub Desktop.
DU case conflict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Animal = | |
| Cat | |
| Dog | |
| Horse | |
type AnimalSize = | |
| CatLarge | |
| DogSmall | |
| HorseMedium | |
// ^ changing this to Horse will result in a compile error on the last line | |
let animal (a:Animal) = | |
match a with | |
| Cat -> "cat" | |
| Dog -> "dog" | |
| Horse -> "horse" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment