Remove SymbolicBinding step in TypeIterator (#7039)

TypeIterator has both SymbolicType and SymbolicBinding and these overlap
in their meaning. Clarify the API by removing SymbolicBinding and just
using SymbolicType for `SymbolicBinding` insts and when they are
converted to `type` to make a `SymbolicBindingType` inst. Add the
EntityNameId to the SymbolicType for when it is available, when the
instruction is just a simple reference to a binding.

---------

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
This commit is contained in:
Dana Jansens
2026-04-09 13:25:16 +00:00
committed by GitHub
co-authored by Chandler Carruth
parent ab977ee04d
commit 6cc08ae6e6
4 changed files with 54 additions and 26 deletions
+2 -2
View File
@@ -117,8 +117,8 @@ static auto TypeStructureReferencesSelf(
// Don't generate more diagnostics.
return true;
}
case CARBON_KIND(SemIR::TypeIterator::Step::SymbolicBinding bind): {
if (context.entity_names().Get(bind.entity_name_id).name_id ==
case CARBON_KIND(SemIR::TypeIterator::Step::SymbolicType symbolic): {
if (context.entity_names().Get(symbolic.entity_name_id).name_id ==
SemIR::NameId::SelfType) {
return true;
}