mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Poison impl lookup queries with concrete results (#5373)
Once a concrete result has been found, it's not legal to write an `impl` that would change the concrete result afterward. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
bd99b74608
commit
13da710e94
@@ -207,7 +207,8 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id,
|
||||
GetCanonicalizedFacetOrTypeValue(context, inst.query_self_inst_id);
|
||||
|
||||
auto result = EvalLookupSingleImplWitness(
|
||||
context, SemIR::LocId(inst_id), inst, non_canonical_query_self_inst_id);
|
||||
context, SemIR::LocId(inst_id), inst, non_canonical_query_self_inst_id,
|
||||
/*poison_concrete_results=*/true);
|
||||
if (!result.has_value()) {
|
||||
// We use NotConstant to communicate back to impl lookup that the lookup
|
||||
// failed. This can not happen for a deferred symbolic lookup in a generic
|
||||
|
||||
Reference in New Issue
Block a user