mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:51:12 +01:00
Add diagnostic support so that we can just pass in TypeId. (#3695)
Note we may also want to do this with NameId, maybe some other things, but the TypeId use is pretty broad and repetitive -- I thought I'd start with it first.
This commit is contained in:
@@ -38,9 +38,9 @@ auto HandleCallExpr(Context& context, Parse::CallExprId parse_node) -> bool {
|
||||
auto callee_type_id = context.insts().Get(callee_id).type_id();
|
||||
if (callee_type_id != SemIR::TypeId::Error) {
|
||||
CARBON_DIAGNOSTIC(CallToNonCallable, Error,
|
||||
"Value of type `{0}` is not callable.", std::string);
|
||||
"Value of type `{0}` is not callable.", SemIR::TypeId);
|
||||
context.emitter().Emit(call_expr_parse_node, CallToNonCallable,
|
||||
context.sem_ir().StringifyType(callee_type_id));
|
||||
callee_type_id);
|
||||
}
|
||||
context.node_stack().Push(parse_node, SemIR::InstId::BuiltinError);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user