mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user