This commit is contained in:
Folkert 2021-04-23 11:27:36 +02:00
parent 2dab9c81d1
commit 95fbc15373
3 changed files with 17 additions and 2 deletions

View File

@ -406,7 +406,6 @@ fn fix_values_captured_in_closure_expr(
}
Expect(condition, loc_expr) => {
// LetNonRec(Box<Def>, Box<Located<Expr>>, Variable, Aliases),
fix_values_captured_in_closure_expr(&mut condition.value, no_capture_symbols);
fix_values_captured_in_closure_expr(&mut loc_expr.value, no_capture_symbols);
}

View File

@ -4442,7 +4442,7 @@ fn run_low_level<'a, 'ctx, 'env>(
IntPredicate::EQ,
cond.into_int_value(),
context.bool_type().const_int(1, false),
"has_not_overflowed",
"is_true",
);
let then_block = context.append_basic_block(parent, "then_block");

View File

@ -2296,3 +2296,19 @@ fn call_invalid_layout() {
true
);
}
#[test]
#[should_panic(expected = "assert failed!")]
fn expect_fail() {
assert_evals_to!(
indoc!(
r#"
expect 1 == 2
3
"#
),
3,
i64
);
}