roc/crates/compiler/mono
Ayaz Hafiz 759127660d
Spread list tests can never touch exact-sized bounds tests
When compiling a pattern match like

```
[] -> ..
[_] -> ..
[_, ..] -> ..
```

to a decision tree, we must make sure that the last test (len >= 1)
does not touch the branch reached by the second test (len == 1). It is
enough to ban (len >=) tests from ever touching exact-sized list
patterns, because a spread test (len >=) can never reach an exact-sized
test.

On the other hand, an exact-sized test can reach a spread pattern,
because in

```
[_, _] -> ..
[..] -> ..
```

the last branch generates tests for patterns `[]` and `[_]`, and we would
like those patterns to be covered by the spread test (len >= 0)!

Closes #4685
2022-12-05 13:45:35 -06:00
..
src Spread list tests can never touch exact-sized bounds tests 2022-12-05 13:45:35 -06:00
Cargo.toml more workspace dependencies 2022-11-13 16:10:02 +01:00