mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-02 22:02:51 +01:00
When deducing an argument against a type that is `<facet value> as type` we don't care about the `as type` part of that expression. We want to find an argument that can convert to the `FacetType` of the facet value for the generic binding that is the `<facet value>`. This was done after-the-fact in the Deduce switch, but we move this canonicalization step to be more explicit and done up front at the start of the Deduce loop. This: - Avoids a trip through the Deduce loop for a `FacetAccessType` parameter, just to deduce through it in the switch, which avoids convert and creation of extraneous constant values. - Uses the `GetCanonicalFacetOrTypeValue()` function so that when we add `SymbolicBindingType` handling to that function it will apply to Deduce as well correctly, instead of needing to handle both in the switch.