Files
carbon-lang/toolchain/lower/testdata/function
Richard Smith 7569aff619 Don't convert runtime arguments during deduction. (#7265)
When performing deduction for a call to a generic function, we would
previously convert runtime arguments to match the parameter type, then
throw away the result. Instead, track whether deduction needs the value
of the argument, which will be the case only within compile-time
contexts such as generic bindings and types of instructions, and only
perform conversions during deduction for those contexts.

Fixes miscompiles when passing an argument requiring a runtime
conversion with side-effects to a generic function, where previously the
side-effects would have happened twice! (Once from deduction and once
from the real call argument conversion.)

Assisted-by: Gemini via Antigravity
2026-05-27 21:44:29 +00:00
..