mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
408 B
408 B
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.
foo t =
(x, _) = t
f w = w + x
match t with
(x, y)
| y < 5 -> f x
| otherwise -> x + y
> foo (10,20)