Use ty.for_debug

This commit is contained in:
Andy Leiserson 2025-04-08 11:45:44 -07:00 committed by Jim Blandy
parent d223bb582f
commit be16f8ce18
2 changed files with 4 additions and 3 deletions

View File

@ -614,7 +614,8 @@ impl<'a> ResolveContext<'a> {
TypeResolution::Value(bool)
} else {
return Err(ResolveError::IncompatibleOperands(format!(
"{op:?}({ty:?}, _)"
"{op:?}({:?}, _)",
ty.for_debug(types),
)));
}
}

View File

@ -3185,7 +3185,7 @@ fn vector_logical_ops() {
"fn foo(a: vec2<bool>, b: vec2<bool>) {
let y = a && b;
}",
r#"error: Incompatible operands: LogicalAnd(Vector { size: Bi, scalar: Scalar { kind: Bool, width: 1 } }, _)
r#"error: Incompatible operands: LogicalAnd(vec2<bool>, _)
"#,
);
@ -3194,7 +3194,7 @@ fn vector_logical_ops() {
"fn foo(a: vec2<bool>, b: vec2<bool>) {
let y = a || b;
}",
r#"error: Incompatible operands: LogicalOr(Vector { size: Bi, scalar: Scalar { kind: Bool, width: 1 } }, _)
r#"error: Incompatible operands: LogicalOr(vec2<bool>, _)
"#,
);