mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-14 13:38:54 +00:00
When a deduced return type depends on the function's generic parameters, it's computed by the definition's eval block, so resolve the specific's definition at the call. Calling a specific during its own instantiation, before the point where its return type is deduced, is diagnosed like any other use of the function before its return type is known. Also allow exporting such functions to C++. Resolving such a specific from within a checked generic can perform template actions with symbolic arguments. Perform delayed actions in a discarded generic region so the instructions they create aren't attached to the generic being checked, and check that evaluating a specific doesn't add anything to an enclosing generic region. Assisted-by: Claude via Antigravity