Compare commits
3 Commits
de21aaf907
...
45a549fb01
Author | SHA1 | Date |
---|---|---|
David Mak | 45a549fb01 | |
David Mak | 2707735274 | |
David Mak | 42f8dab980 |
|
@ -804,21 +804,13 @@ fn polymorphic_print<'ctx>(
|
|||
}
|
||||
|
||||
match &*ctx.unifier.get_ty_immutable(ty) {
|
||||
TypeEnum::TTuple { ty: tys, is_vararg_ctx: false } => {
|
||||
debug_assert_eq!(
|
||||
tys.len() as u32,
|
||||
value.into_struct_value().count_fields(),
|
||||
"Expected {} types for {}, got [{}] ({} types) in corresponding LLVM type",
|
||||
tys.len(),
|
||||
ctx.unifier.stringify(ty),
|
||||
value.into_struct_value().get_fields().map(|field| field.get_type().to_string()).join(", "),
|
||||
value.into_struct_value().count_fields(),
|
||||
);
|
||||
TypeEnum::TTuple { ty, is_vararg_ctx: false } => {
|
||||
debug_assert_eq!(ty.len() as u32, value.into_struct_value().count_fields());
|
||||
|
||||
fmt.push('(');
|
||||
flush(ctx, generator, &mut fmt, &mut args);
|
||||
|
||||
let tuple_vals = tys
|
||||
let tuple_vals = ty
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(i, ty)| {
|
||||
|
|
Loading…
Reference in New Issue