fix pattern match test ordering problem

This commit is contained in:
Folkert 2020-11-16 02:18:18 +01:00
parent a952d24370
commit 93b6315f46
2 changed files with 59 additions and 42 deletions

View file

@ -1316,7 +1316,7 @@ fn compile_tests<'a>(
cond = compile_guard(env, ret_layout.clone(), id, arena.alloc(stmt), fail, cond);
}
for (new_stores, lhs, rhs, _layout) in tests.into_iter().rev() {
for (new_stores, lhs, rhs, _layout) in tests.into_iter() {
cond = compile_test(env, ret_layout.clone(), new_stores, lhs, rhs, fail, cond);
}
cond