mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-17 03:18:11 +00:00
A value of type FacetAccessType can convert to a facet value of a target FacetType if the value's underlying facet value's FacetType is compatible. A value of type FacetType can convert to another value of type FacetType if the value's FacetType is compatible with the target FacetType. During impl lookup, the comparison of the lookup type and the impl's type needs to consider more than strict equality. If the impl's self type is a FacetAccessType, we instead need to verify that the FacetType of the lookup type and of the impl's self type are compatible (which is like a problem of another impl lookup). For now we check that they are equal by unwrapping the FacetAccessType to the constant facet value within, and compare that with the lookup type. --------- Co-authored-by: josh11b <15258583+josh11b@users.noreply.github.com>