Skip to content

Instantly share code, notes, and snippets.

@jcmrva
Created March 29, 2022 23:28
Show Gist options
  • Save jcmrva/df485092f9b0114845d48523f56f8101 to your computer and use it in GitHub Desktop.
Save jcmrva/df485092f9b0114845d48523f56f8101 to your computer and use it in GitHub Desktop.
DU case conflict
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