From 768537d6e4b82a19e77b7e44234309ecaf4d65d2 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 12 Jul 2026 13:23:54 +0200 Subject: Remove unions --- boot/semantic.cc | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'boot/semantic.cc') diff --git a/boot/semantic.cc b/boot/semantic.cc index df6e70e..29925c2 100644 --- a/boot/semantic.cc +++ b/boot/semantic.cc @@ -459,16 +459,6 @@ namespace elna::boot return type(std::make_shared(lookup_primitive_type("Char"))); } } - else if (auto composite = resolved_type.get()) - { - for (auto& field : composite->fields) - { - if (field.first == field_name) - { - return field.second; - } - } - } return type(); } @@ -581,16 +571,6 @@ namespace elna::boot this->current_type = type(result_type); } - void name_analysis_visitor::visit(union_type_expression *expression) - { - auto result_type = std::make_shared(); - - std::set field_names; - result_type->fields = build_composite_type(expression->fields, field_names); - - this->current_type = type(result_type); - } - void name_analysis_visitor::visit(procedure_type_expression *expression) { std::shared_ptr result_type = -- cgit v1.2.3