mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 13:08:13 +00:00
When a generic impl uses a default or final fn, it picks the specific function value out of the interface to put in the witness table. However, because this is done by modifying an existing instruction block, the generics machinery has no hook to convert the function constant into an attached constant, and because it was found in a specific for a different generic, the constant inst will be unattached. Fix this by manually mapping to an attached constant inst in the current generic when building the witness table.