Skip to content

Commit d9d0782

Browse files
committed
Don't try to build an LLVM switch on floats
Closes #1046
1 parent 3cabe74 commit d9d0782

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/comp/middle/trans_alt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,8 @@ fn compile_submatch(bcx: @block_ctxt, m: match, vals: [ValueRef], f: mk_fail,
473473
}
474474
lit(l) {
475475
kind = alt l.node {
476-
ast::lit_str(_) | ast::lit_nil. {
476+
ast::lit_str(_) | ast::lit_nil. | ast::lit_float(_) |
477+
ast::lit_mach_float(_, _) {
477478
test_val = Load(bcx, val); compare
478479
}
479480
_ { test_val = Load(bcx, val); switch }

0 commit comments

Comments
 (0)