mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
If convert fails after applying a substitution in deduce, fail deduction rather than succeeding deduction with an ErrorInst in the deduced argument. For example, in `toolchain/check/testdata/facet/fail_convert_class_type_to_generic_facet_value.carbon` the `WrongGenericParam` is deduced for the first argument, then substituted into the second parameter, but the argument can not convert to the parameter after substitution. In this case, deduction fails instead of producig a call with an error in the second argument. The resulting semir drops the call with an error argument: ``` -// CHECK:STDOUT: %CallGenericMethod.specific_fn: <specific function> = specific_function %CallGenericMethod.ref, @CallGenericMethod(constants.%WrongGenericParam, <error>) [concrete = <error>] -// CHECK:STDOUT: %CallGenericMethod.call: init %empty_tuple.type = call %CallGenericMethod.specific_fn() [concrete = <error>] ```