mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 19:50:14 +01:00
Two somewhat related fixes. The first is call-specific for now (because it's the first action to take a `MetaInstId`), and the second is general across all actions, but it seems like calls are the easiest place to hit it. 1) Add support for refining inst blocks as action operands. Refine all the insts in the block, using the appropriate InstId-derived type. 2) When an action operand is a `MetaInstId` referring to an unattached constant, form a corresponding attached constant. This comes up when forming (for example) an implicit `AddWith(%T)` call, where the `%T` operand is an unattached constant. This causes us to form correct specifics in more cases, where previously we formed specifics that contained values that were still template-dependent. This unfortunately causes some existing template tests to produce more errors, but those errors reflect cases where we were previously silently doing the wrong thing.