diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-10-08 01:29:37 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-10-08 01:29:37 +0200 |
| commit | d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c (patch) | |
| tree | c4d2f2ea44bbcb26108e86270a4454cd04f7873a /boot/name_analysis.cc | |
| parent | 12e304fd56f054ba7296ab538eecd4280a67832a (diff) | |
| download | elna-d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c.tar.gz | |
Move record constructor type into the braces
Diffstat (limited to 'boot/name_analysis.cc')
| -rw-r--r-- | boot/name_analysis.cc | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/boot/name_analysis.cc b/boot/name_analysis.cc index ff5f6bc..5ad2a75 100644 --- a/boot/name_analysis.cc +++ b/boot/name_analysis.cc @@ -918,21 +918,8 @@ namespace elna::boot void resolving_visitor::visit(record_constructor_expression *expression) { - if (const auto type_symbol = this->bag.lookup(expression->type_name.name())) - { - if (const auto type_info = type_symbol->is_type()) - { - expression->type_decoration = expression->arguments.empty() - ? type_info->symbol - : type(std::make_shared<instantiated_type>(type_info->symbol, - resolve_arguments(expression->arguments))); - } - } - else - { - add_error<symbol_declaration_error>(expression->type_name.position(), - expression->type_name.name(), symbol_declaration_error::kind::undeclared_type); - } + expression->type_decoration = resolve_type(expression->record_type()); + for (const field_initializer& initializer : expression->field_initializers) { initializer.value().accept(this); |
