mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 22:02:45 +01:00
Poison impl lookup queries with concrete results (#5373)
Once a concrete result has been found, it's not legal to write an `impl` that would change the concrete result afterward. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
bd99b74608
commit
13da710e94
@@ -723,4 +723,16 @@ auto StringifySpecific(const File& sem_ir, SpecificId specific_id)
|
||||
return Stringify(sem_ir, step_stack);
|
||||
}
|
||||
|
||||
auto StringifySpecificInterface(const File& sem_ir,
|
||||
SpecificInterface specific_interface)
|
||||
-> std::string {
|
||||
if (specific_interface.specific_id.has_value()) {
|
||||
return StringifySpecific(sem_ir, specific_interface.specific_id);
|
||||
} else {
|
||||
auto name_id =
|
||||
sem_ir.interfaces().Get(specific_interface.interface_id).name_id;
|
||||
return sem_ir.names().GetFormatted(name_id).str();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Carbon::SemIR
|
||||
|
||||
Reference in New Issue
Block a user