mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
If a `BindSymbolicName` is converted to `type` and then to its exact `FacetType`, we get a `FacetValue` wrapping the `BindSymbolicName` but providing no different information: it has the same witnesses and `FacetType` as the original `BindSymbolicName`. Yet it is a different constant value, creating multiple canonical forms with the same meaning. Now we make that `FacetValue` with the same `FacetType` as the `BindSymbolicName` it wraps evaluate back to the `BindSymbolicName`, making it the unique canonical form. This makes the "shortcut" in convert for avoiding impl lookup when converting from `FacetAccessType` to `FacetType` in this exact scenario work the same as doing the full impl lookup. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>