Don't try to build an LLVM switch on floats

Closes #1046
This commit is contained in:
Marijn Haverbeke 2011-10-18 13:49:28 +02:00
parent 3cabe7429f
commit d9d0782b5f

View file

@ -473,7 +473,8 @@ fn compile_submatch(bcx: @block_ctxt, m: match, vals: [ValueRef], f: mk_fail,
}
lit(l) {
kind = alt l.node {
ast::lit_str(_) | ast::lit_nil. {
ast::lit_str(_) | ast::lit_nil. | ast::lit_float(_) |
ast::lit_mach_float(_, _) {
test_val = Load(bcx, val); compare
}
_ { test_val = Load(bcx, val); switch }