mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-14 13:38:54 +00:00
When unqualified lookup finds a name from an enclosing generic, create a `specific_constant` if it's a constant, or a `specific_inst` otherwise, to refer to that name from the inner generic. This allows consumers of generic instructions to always use a specific of the current scope's generic when accessing the constant value or type of a dependent instruction. Fixes crashes in dominance and in `GetExprCategory` caused by using specifics for the wrong generic. Assisted-by: Gemini via Antigravity