[core] codegen/expr: Add compilation error for unsupported cmpop

This commit is contained in:
David Mak 2024-08-20 11:29:51 +08:00
parent e6e3666190
commit c6e3ecaeb9
1 changed files with 1 additions and 1 deletions

View File

@ -2208,7 +2208,7 @@ pub fn gen_cmpop_expr_with_values<'ctx, G: CodeGenerator>(
ctx.ctx.bool_type().get_poison()
} else {
unimplemented!()
return Err(format!("'{}' not supported between instances of '{}' and '{}'", op.op_info().symbol, ctx.unifier.stringify(left_ty), ctx.unifier.stringify(right_ty)))
};
Ok(prev?.map(|v| ctx.builder.build_and(v, current, "cmp").unwrap()).or(Some(current)))