unison/unison-src/transcripts/fix3244.md

22 lines
408 B
Markdown
Raw Permalink Normal View History

```ucm:hide
scratch/main> builtins.merge
```
This tests an previously erroneous case in the pattern compiler. It was assuming
that the variables bound in a guard matched the variables bound in the rest of
the branch exactly, but apparently this needn't be the case.
```unison
foo t =
(x, _) = t
f w = w + x
match t with
(x, y)
| y < 5 -> f x
| otherwise -> x + y
> foo (10,20)
```