Files
carbon-lang/toolchain/check/testdata/interface
Richard Smith 42bda1e38f Don't substitute into the targeted instructions of an associated constant. (#4342)
When an instruction makes an absolute reference to another instruction,
such as when `assoc_const` refers to the declaration of the associated
constant in an interface, substitution into that instruction should not
substitute into the referenced instruction.

Mark the corresponding `InstId` fields in the typed instructions as
being absolute by giving them a distinct ID type that `Subst` doesn't
substitute into. This formation of unnecessarily complicated SemIR that
could in some cases lead to a CHECK failure when printing formatted
SemIR because the same instruction ends up in multiple scopes.
2024-09-27 17:41:05 +00:00
..