mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 21:31:24 +01:00
Implement ...where .Self impls... (#5238)
* Also remove facet type deduction, since we decided against it on [2025-04-02](https://docs.google.com/document/d/1Iut5f2TQBrtBNIduF4vJYOKfw7MbS8xH_J01_Q4e6Rk/edit?pli=1&resourcekey=0-mc_vh5UzrzXfU4kO-3tOjA&tab=t.0#heading=h.95phmuvxog9n). --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com> Co-authored-by: Dana Jansens <danakj@orodu.net>
This commit is contained in:
co-authored by
Josh L
Dana Jansens
parent
87f0e9723f
commit
4af0c8f8d1
@@ -114,7 +114,14 @@ LLVM_DUMP_METHOD auto Dump(const File& file, FacetTypeId facet_type_id)
|
||||
|
||||
const auto& facet_type = file.facet_types().Get(facet_type_id);
|
||||
out << ": " << facet_type;
|
||||
for (auto impls : facet_type.impls_constraints) {
|
||||
for (auto impls : facet_type.extend_constraints) {
|
||||
out << "\n - " << Dump(file, impls.interface_id);
|
||||
if (impls.specific_id.has_value()) {
|
||||
out << "; " << DumpSpecificSummary(file, impls.specific_id);
|
||||
}
|
||||
out << " (extend)";
|
||||
}
|
||||
for (auto impls : facet_type.self_impls_constraints) {
|
||||
out << "\n - " << Dump(file, impls.interface_id);
|
||||
if (impls.specific_id.has_value()) {
|
||||
out << "; " << DumpSpecificSummary(file, impls.specific_id);
|
||||
@@ -296,10 +303,10 @@ LLVM_DUMP_METHOD auto Dump(const File& file,
|
||||
if (req_interface == identified_facet_type.impl_as_target_interface()) {
|
||||
out << " (to impl)";
|
||||
}
|
||||
if (!identified_facet_type.is_valid_impl_as_target()) {
|
||||
out << "\n - (" << identified_facet_type.num_interfaces_to_impl()
|
||||
<< " to impl)\n";
|
||||
}
|
||||
}
|
||||
if (!identified_facet_type.is_valid_impl_as_target()) {
|
||||
out << "\n - (" << identified_facet_type.num_interfaces_to_impl()
|
||||
<< " to impl)\n";
|
||||
}
|
||||
return out.TakeStr();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user