mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 09:21:04 +01:00
Add facet type values and an instruction that produces them (#4460)
Still to do: * Represent facet type values in a canonical form * Produce & consume facet type values instead of interface values * `type` should be associated with a canonical facet type value * Support `&` on facet type values * Type check and enforce requirements in facet types --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
@@ -956,6 +956,17 @@ class FormatterImpl {
|
||||
}
|
||||
}
|
||||
|
||||
auto FormatArg(FacetTypeId id) -> void {
|
||||
const auto& info = sem_ir_.facet_types().Get(id);
|
||||
out_ << "<facet-type ";
|
||||
FormatType(info.base_facet_type_id);
|
||||
if (info.requirement_block_id.is_valid()) {
|
||||
// TODO: include specifics
|
||||
out_ << "+requirements";
|
||||
}
|
||||
out_ << ">";
|
||||
}
|
||||
|
||||
auto FormatArg(IntKind k) -> void { k.Print(out_); }
|
||||
|
||||
auto FormatArg(FloatKind k) -> void { k.Print(out_); }
|
||||
|
||||
Reference in New Issue
Block a user