From 308a2addf655fe45f2098f8542f0ff1290612cd9 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 14 Jul 2026 19:42:32 +0200 Subject: Replace procedure end with return --- boot/semantic.cc | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'boot/semantic.cc') diff --git a/boot/semantic.cc b/boot/semantic.cc index d7a23be..dd9022b 100644 --- a/boot/semantic.cc +++ b/boot/semantic.cc @@ -177,24 +177,6 @@ namespace elna::boot void type_analysis_visitor::visit(unit *unit) { walking_visitor::visit(unit); - - if (unit->has_body()) - { - if (unit->return_expression != nullptr) - { - type return_type = this->bag.lookup("Int")->is_type()->symbol; - - if (!is_assignable_from(return_type, unit->return_expression->type_decoration)) - { - add_error(type_expectation_error::kind::result, - unit->return_expression->position()); - } - } - else - { - add_error("module", unit->position()); - } - } } void type_analysis_visitor::visit(assign_statement *statement) @@ -773,10 +755,6 @@ namespace elna::boot { statement->accept(this); } - if (unit->return_expression != nullptr) - { - unit->return_expression->accept(this); - } this->bag.leave(); } } -- cgit v1.2.3