mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
Make FacetAccessType evaluate to SymbolicBindingType for type-of a BindSymbolicName (#6115)
The SymbolicBindingType refers to the type value that will be substituted in for the BindSymbolicName, but holds onto the EntityNameId from the BindSymbolicName instead of (or in addition to, for now) the instruction. The EntityNameId will be used to look in the ScopeStack to find the witnesses either from the BindSymbolicName instruction, or other instructions that specify `impls` constraints against the EntityName. This will allow us to have the `T` in `I(T)` resolve to a `.Self` reference in the type so that we get type equality with the binding's type: `T:! I(.Self)`.
This commit is contained in:
@@ -627,6 +627,10 @@ class Stringifier {
|
||||
}
|
||||
}
|
||||
|
||||
auto StringifyInst(InstId /*inst_id*/, SymbolicBindingType inst) -> void {
|
||||
step_stack_->PushEntityNameId(inst.entity_name_id);
|
||||
}
|
||||
|
||||
auto StringifyInst(InstId /*inst_id*/, TupleType inst) -> void {
|
||||
auto refs = sem_ir_->inst_blocks().Get(inst.type_elements_id);
|
||||
if (refs.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user