From d4b7f5e52a33f2d15aafca7f1b040f3f2821fd0c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 8 Oct 2026 01:29:37 +0200 Subject: Move record constructor type into the braces --- boot/name_analysis.cc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'boot/name_analysis.cc') 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(type_info->symbol, - resolve_arguments(expression->arguments))); - } - } - else - { - add_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); -- cgit v1.2.3