mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-01 20:35:53 +01:00
The code was going through the raw `constraint_id` facet type, which could be a named constraint. To get the interface being impl'd, use the IdentifiedFacetType. Import was adding an IdenfiedFacetTypeId for the facet type when importing an ImplDecl, however it was using an attached self constant. Then later lookups using `constant_values().GetConstantId(...)` from the `self_id` would give an unattached constant and not find the IdentifiedFacetTypeId. So have import do what we do when making an ImplDecl locally, and use the unattached constant for the RequireIdentifiedFacetType call. We add a test of mangling an `impl as` for a named constraint, which crashes before this change.