mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 12:51:04 +01:00
Switch EvalLookupSingleImplWitness from "concrete" to "final" terminology (#6246)
A `final impl` can have a symbolic witness, but that witness is still final. Using "final" here per discussion on [#generics-and-templates](https://discord.com/channels/655572317891461132/941071822756143115/1428851511672312120). I'm also changing the variant a little because `concrete_witness` was only called when `has_concrete_value` was true, so it can be more careful about its contract. Having a more explicit `None` also simplifies `has_value`. I think it doesn't change the overall cost much past that.
This commit is contained in:
@@ -526,9 +526,9 @@ auto CheckUnit::CheckPoisonedConcreteImplLookupQueries() -> void {
|
||||
for (const auto& poison : poisoned_queries) {
|
||||
auto witness_result = EvalLookupSingleImplWitness(
|
||||
context_, poison.loc_id, poison.query, poison.query.query_self_inst_id,
|
||||
/*poison_concrete_results=*/false);
|
||||
CARBON_CHECK(witness_result.has_concrete_value());
|
||||
auto found_witness_id = witness_result.concrete_witness();
|
||||
/*poison_final_results=*/false);
|
||||
CARBON_CHECK(witness_result.has_final_value());
|
||||
auto found_witness_id = witness_result.final_witness();
|
||||
if (found_witness_id != poison.impl_witness) {
|
||||
auto witness_to_impl_id = [&](SemIR::InstId witness_id) {
|
||||
auto table_id = context_.insts()
|
||||
|
||||
Reference in New Issue
Block a user