mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-21 10:56:39 +00:00
If 'extend impl' is invalid, mark the impl as invalid by putting an ErrorInst in the witness_id field. The construction of the witness_id can otherwise return an ErrorInst but impl lookup was not checking for that. Now have impl lookup check for an error there before attempting to deduce generic parameters, which avoids infinite recursion through deduction in cases like a cyclical impl of itself. Adds a testcase for infinite impl-of-itself lookup found by fuzzer.