Boolean pattern match crashes the compiler
Arvid gives me an example which kills the compiler:
open SCaml
let main () () =
match true with
| true -> [], ()
| false -> [], ()
Fatal error: exception "Assert_failure translate.ml:999:15"
Raised at file "translate.ml", line 999, characters 15-27
Called from file "translate.ml", line 1130, characters 18-73
Called from file "translate.ml", line 1575, characters 10-61
Called from file "translate.ml", line 1440, characters 31-48
Called from file "translate.ml", line 1422, characters 17-35
Called from file "translate.ml", line 1539, characters 40-66
Called from file "list.ml", line 99, characters 22-25
Called from file "lib/xlist.ml", line 151, characters 21-32
Called from file "translate.ml", line 1541, characters 45-72
Called from file "translate.ml", line 1539, characters 40-66
Called from file "list.ml", line 99, characters 22-25
Called from file "lib/xlist.ml", line 151, characters 21-32
Called from file "translate.ml", line 1541, characters 45-72
Called from file "translate.ml", line 1719, characters 14-37
Called from file "translate.ml", line 1746, characters 30-51
Called from file "list.ml", line 117, characters 24-34
Called from file "translate.ml", line 1745, characters 8-139
Called from file "translate.ml", line 1763, characters 24-49
Called from file "list.ml", line 117, characters 24-34
Called from file "translate.ml", line 1762, characters 4-151
Called from file "translate.ml", line 2160, characters 45-158
Called from file "SCamlc.ml", line 59, characters 30-69
Called from file "main.ml", line 68, characters 7-78
Re-raised at file "main.ml", line 71, characters 8-15
Called from file "utils/misc.ml", line 28, characters 20-27
Re-raised at file "utils/misc.ml", line 28, characters 50-57
Called from file "driver/compenv.ml", line 578, characters 6-35
Called from file "list.ml", line 106, characters 12-15
Called from file "driver/compenv.ml", line 654, characters 2-61
Called from file "main.ml", line 237, characters 6-147
Re-raised at file "parsing/location.ml", line 494, characters 14-25
Re-raised at file "parsing/location.ml", line 494, characters 14-25
Re-raised at file "parsing/location.ml", line 494, characters 14-25
Re-raised at file "parsing/location.ml", line 494, characters 14-25
Re-raised at file "parsing/location.ml", line 494, characters 14-25
Re-raised at file "parsing/location.ml", line 494, characters 14-25
Called from file "parsing/location.ml" (inlined), line 499, characters 31-61
Called from file "main.ml", line 264, characters 4-35
Called from file "main.ml", line 268, characters 2-9
Edited by Jun Furuse