mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 10:08:29 +00:00
Calls to functions with a `ref` or `val` return form whose type might be initialized in place (such as a class type) were given temporary return storage, based only on the return type. Caller pattern matching then matched that storage against the callee's `ref_return_pattern` or `value_return_pattern`, which only supports the callee side, and CHECK-failed. Instead, base the decision on `call_param_ranges.return_size()`, which is computed once from the same return pattern when the callee's declaration is built, and assert the same property in `ConvertCallArgs` before caller pattern matching. Assisted-By: Claude