Implement support for string and tuple equality comparison #503

Merged
sb10q merged 11 commits from fix/issue-500 into master 2024-08-21 18:39:06 +08:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit c407622f5c - Show all commits

View File

@ -2208,7 +2208,10 @@ 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)))