return failure();
if (!retTypeFn.isCompatibleReturnTypes(inferredReturnTypes,
op->getResultTypes()))
- return op->emitOpError(
- "inferred type incompatible with return type of operation");
+ return op->emitOpError("inferred type(s) ")
+ << inferredReturnTypes
+ << " are incompatible with return type(s) of operation "
+ << op->getResultTypes();
return success();
}
// -----
func @complex_f64_failure() {
- // expected-error@+1 {{op inferred type incompatible with return type of operation}}
+ // expected-error@+1 {{op inferred type(s) 'complex<f64>' are incompatible with return type(s) of operation 'f64'}}
"test.complex_f64"() : () -> (f64)
return
}
// -----
func @same_types_element_mismatch(%arg0: tensor<* x i32>, %arg1: tensor<* x f32>) {
- // expected-error@+1 {{type incompatible with return type of operation}}
+ // expected-error@+1 {{op inferred type(s) 'tensor<*xi32>' are incompatible with return type(s) of operation 'tensor<*xf32>'}}
"test.operand0_and_result_have_same_type"(%arg0, %arg1) : (tensor<* x i32>, tensor<* x f32>) -> tensor<* x f32>
return
}
// -----
func @same_types_shape_mismatch(%arg0: tensor<1x2xi32>, %arg1: tensor<2x1xi32>) {
- // expected-error@+1 {{type incompatible with return type of operation}}
+ // expected-error@+1 {{op inferred type(s) 'tensor<1x2xi32>' are incompatible with return type(s) of operation 'tensor<2x1xi32>'}}
"test.operand0_and_result_have_same_type"(%arg0, %arg1) : (tensor<1x2xi32>, tensor<2x1xi32>) -> tensor<2x1xi32>
return
}