mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:40:12 +01:00
The `.Self` needs to be canonicalized when recording the witness, since it will be a FacetAccessType in the `impls` clause. Todo tests are also added for `C impls Y(.Self)`. The `.Self` in the interface specific breaks everything as we end up replacing the `.Self` with `C` in later `C as Y(.Self)` lookups, which then does not find the witness. Pull all the witnesses from `impls` constraints so that we capture witnesses coming from named constraints on different self types, as `C impls N(.Self)` may give witnesses for `C` or for other self types.