mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
@@ -186,6 +186,10 @@ class FunctionContext {
|
||||
auto InitializeStorage(TypeInFile type, SemIR::InstId dest_id,
|
||||
SemIR::InstId source_id) -> void;
|
||||
|
||||
// Emits the instructions necessary to perform the initialization described by
|
||||
// `init_id` in-place in its storage.
|
||||
auto InitializeStorage(SemIR::InstId init_id) -> void;
|
||||
|
||||
// When fingerprinting for a specific, adds the call, found in the function
|
||||
// body, to <function_id, specific_id>. `function_id` and `specific_id` are
|
||||
// IDs within the file identified by `function_file_id`.
|
||||
|
||||
Reference in New Issue
Block a user