mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
This problem is the cause of Mantis bug #452. compiler/switch_util.m: Don't require a bit vector check for cannot_fail switches, even in cases where the switch arms do not completely cover the range of possible values in the switched-on variable's type; if the switch is cannot_fail, then the switch variable cannot have any of the "missing" values when the switch is entered. tests/hard_coded/bug452.{m,exp}: A regression test for the bug. tests/hard_coded/Mmakefile: Enable the new test case.
21 lines
314 B
Plaintext
21 lines
314 B
Plaintext
thing1 cat1 -> cat1
|
|
thing1 cat2 -> cat1
|
|
thing1 nocat -> cat1
|
|
|
|
thing2 cat1 -> cat1
|
|
thing2 cat2 -> cat1
|
|
thing2 nocat -> cat1
|
|
|
|
nothing cat1 -> cat1
|
|
nothing cat2 -> cat2
|
|
nothing nocat -> nocat
|
|
|
|
thing3 cat1 -> cat2
|
|
thing3 cat2 -> cat2
|
|
thing3 nocat -> cat2
|
|
|
|
thing4 cat1 -> cat2
|
|
thing4 cat2 -> cat2
|
|
thing4 nocat -> cat2
|
|
|