Track complete types required by a generic. (#4652)

When a generic requires a symbolic type to be complete, add a new
`require_complete_type` instruction to the generic eval block. During
monomorphization of such an instruction, require that type to be
complete.
This commit is contained in:
Richard Smith
2024-12-10 03:00:28 +00:00
committed by GitHub
parent e75ef34591
commit eabe9f117a
107 changed files with 1357 additions and 291 deletions
+1 -1
View File
@@ -968,7 +968,7 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id,
// We can only perform initialization for complete types.
if (!context.TryToCompleteType(
target.type_id,
target.type_id, loc_id,
[&] {
CARBON_CHECK(!target.is_initializer(),
"Initialization of incomplete types is expected to be "