The error would look like:
path/filename.mlir:32:23: error: use of value '%28' expects different type than prior uses: ''i32'' vs ''!_tf.control''
PiperOrigin-RevId:
254874859
return result;
emitError(useInfo.loc, "use of value '")
- .append(useInfo.name, "' expects different type than prior uses")
+ .append(useInfo.name,
+ "' expects different type than prior uses: ", type, " vs ",
+ result->getType())
.attachNote(getEncodedSourceLocation(entries[useInfo.number].second))
.append("prior use here");
return nullptr;
func @condbr_notbool() {
^bb0:
%a = "foo"() : () -> i32 // expected-note {{prior use here}}
- cond_br %a, ^bb0, ^bb0 // expected-error {{use of value '%a' expects different type than prior uses}}
+ cond_br %a, ^bb0, ^bb0 // expected-error {{use of value '%a' expects different type than prior uses: 'i1' vs 'i32'}}
// expected-error@-1 {{expected condition type was boolean (i1)}}
}