roc/crates/compiler/mono/src
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
..
code_gen_help 1.65 clippy fixes 2022-11-03 16:20:37 +01:00
debug Clippy 2022-12-03 23:43:47 -06:00
borrow.rs Provide warning for defs that are used only in (mutual) recursion 2022-12-02 11:50:12 -06:00
debug.rs Format problems reported by the IR checker 2022-12-03 21:35:01 -06:00
decision_tree.rs Spread list tests can never touch exact-sized bounds tests 2022-12-05 13:45:35 -06:00
expand_rc.rs moved all crates into seperate folder + related path fixes 2022-07-01 17:37:43 +02:00
inc_dec.rs Eliminate Stmt::RuntimeError in favor of crash 2022-11-24 14:46:53 -06:00
ir.rs Pretty print symbols 2022-12-03 22:33:45 -06:00
layout.rs Pretty print symbols 2022-12-03 22:33:45 -06:00
layout_soa.rs Miscellaneous cleanup 2022-11-08 14:11:26 -06:00
lib.rs Format problems reported by the IR checker 2022-12-03 21:35:01 -06:00
low_level.rs 1.65 clippy fixes 2022-11-03 16:20:37 +01:00
reset_reuse.rs Eliminate Stmt::RuntimeError in favor of crash 2022-11-24 14:46:53 -06:00
tail_recursion.rs Eliminate Stmt::RuntimeError in favor of crash 2022-11-24 14:46:53 -06:00