Support for initialization of classes with abstract base classes. (#6802)

When initializing `.base` in class initialization, use `partial Base` as
the destination type rather than `Base`. Treat `partial Base` as not
being abstract even when `Base` is.

Allow conversion from a `partial T` initializer to a `T` initializer.
Store the vptr while performing the conversion. Do not store the vptr
when performing a `partial T` initialization, only when performing a
non-partial `T` initialization.
This commit is contained in:
Richard Smith
2026-02-27 01:27:25 +00:00
committed by GitHub
parent be88dfd744
commit 41dd256d56
22 changed files with 717 additions and 233 deletions
+7
View File
@@ -178,6 +178,13 @@ auto FindStorageArgForInitializer(const File& sem_ir, InstId init_id,
init_id = init.result_id;
continue;
}
case CARBON_KIND(UpdateInit init): {
if (!allow_transitive) {
return InstId::None;
}
init_id = init.base_init_id;
continue;
}
case CARBON_KIND(ArrayInit init): {
return init.dest_id;
}