Return a NewAnyPhase result for RequireCompleteType with a CompleteTypeWitness value (#6939)

The `CompleteTypeWitness` can be concrete. This avoids making a symbolic
`CompleteTypeWitness` value which itself has a concrete
`CompleteTypeWitness` value with the same operands.
This commit is contained in:
Dana Jansens
2026-03-20 20:00:08 +00:00
committed by GitHub
parent 000b4f3fa5
commit 6d2387cb77
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -540,7 +540,7 @@ auto EvalConstantInst(Context& context, SemIR::InstId inst_id,
true)) {
return ConstantEvalResult::Error;
}
return ConstantEvalResult::NewSamePhase(SemIR::CompleteTypeWitness{
return ConstantEvalResult::NewAnyPhase(SemIR::CompleteTypeWitness{
.type_id = witness_type_id,
.object_repr_type_inst_id = context.types().GetTypeInstId(
context.types().GetObjectRepr(complete_type_id))});