mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 22:02:52 +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:
@@ -79,6 +79,7 @@ auto HandleParseNode(Context& context, Parse::RequirementEqualEqualId node_id)
|
||||
auto rhs = context.node_stack().PopExpr();
|
||||
auto lhs = context.node_stack().PopExpr();
|
||||
// TODO: type check lhs and rhs are comparable
|
||||
// TODO: require that at least one side uses a designator
|
||||
|
||||
// Build up the list of arguments for the `WhereExpr` inst.
|
||||
context.args_type_info_stack().AddInstId(
|
||||
@@ -103,6 +104,7 @@ auto HandleParseNode(Context& context, Parse::RequirementImplsId node_id)
|
||||
context.emitter().Emit(rhs_node, ImplsOnNonFacetType);
|
||||
rhs_as_type.inst_id = SemIR::InstId::BuiltinError;
|
||||
}
|
||||
// TODO: require that at least one side uses a designator
|
||||
|
||||
// Build up the list of arguments for the `WhereExpr` inst.
|
||||
context.args_type_info_stack().AddInstId(
|
||||
|
||||
Reference in New Issue
Block a user