From 0cc60a3d334faf792ec6a98e99fb3c780a212165 Mon Sep 17 00:00:00 2001 From: David Mak Date: Tue, 27 Aug 2024 19:30:25 +0800 Subject: [PATCH] [core] codegen/expr: Fix missing cast to i1 --- nac3core/src/codegen/expr.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs index 4e3a2136..6fdacf15 100644 --- a/nac3core/src/codegen/expr.rs +++ b/nac3core/src/codegen/expr.rs @@ -2385,7 +2385,10 @@ pub fn gen_cmpop_expr_with_values<'ctx, G: CodeGenerator>( }) .map(BasicValueEnum::into_int_value)?; - Ok(ctx.builder.build_not(cmp, "").unwrap()) + Ok(ctx.builder.build_not( + generator.bool_to_i1(ctx, cmp), + "", + ).unwrap()) }, |_, ctx| { let bb = ctx.builder.get_insert_block().unwrap();