mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +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:
@@ -231,11 +231,10 @@ auto DeclNameStack::TryResolveQualifier(NameContext& name_context,
|
||||
.TryAs<SemIR::ClassDecl>()) {
|
||||
CARBON_DIAGNOSTIC(QualifiedDeclInIncompleteClassScope, Error,
|
||||
"Cannot declare a member of incomplete class `{0}`.",
|
||||
std::string);
|
||||
SemIR::TypeId);
|
||||
auto builder = context_->emitter().Build(
|
||||
name_context.parse_node, QualifiedDeclInIncompleteClassScope,
|
||||
context_->sem_ir().StringifyType(
|
||||
context_->classes().Get(class_decl->class_id).self_type_id));
|
||||
context_->classes().Get(class_decl->class_id).self_type_id);
|
||||
context_->NoteIncompleteClass(class_decl->class_id, builder);
|
||||
builder.Emit();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user