mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
22 lines
491 B
Markdown
22 lines
491 B
Markdown
```ucm:hide
|
|
scratch/main> builtins.merge
|
|
```
|
|
|
|
Tests a case where concrete abilities were appearing multiple times in an
|
|
inferred type. This was due to the pre-pass that figures out which abilities
|
|
are being matched on. It was just concatenating the ability for each pattern
|
|
into a list, and not checking whether there were duplicates.
|
|
|
|
```unison
|
|
structural ability T where
|
|
nat : Nat
|
|
int : Int
|
|
flo : Float
|
|
|
|
f = cases
|
|
{nat -> k} -> 5
|
|
{int -> k} -> 5
|
|
{flo -> k} -> 5
|
|
{x} -> 5
|
|
```
|