mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 11:51:05 +01:00
When performing a call through an impl witness, the callee that we type-check against is the function in the interface, so we form a specific for that callee. However, once the impl witness access resolves, the eventual callee is a different function -- the function in the impl -- so this would cause us to form a `SpecificFunction` where the callee is one function but the specific refers to a different function. Address this by adding another instruction, `SpecificImplFunction`, that takes a function in an impl and a specific for the corresponding function in the interface, and computes and returns a `SpecificFunction` referring to the corresponding specific function in the impl, or returns a direct reference to the function in the `impl` if it's not a generic function.