diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-14 19:42:32 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-14 19:42:32 +0200 |
| commit | 308a2addf655fe45f2098f8542f0ff1290612cd9 (patch) | |
| tree | 19230bdb673d306d59b32427ad2a3ad5e9850631 /boot/semantic.cc | |
| parent | a32a61813ebaecf0c1e69fd1481bf09d8c8b1420 (diff) | |
| download | elna-308a2addf655fe45f2098f8542f0ff1290612cd9.tar.gz | |
Replace procedure end with return
Diffstat (limited to 'boot/semantic.cc')
| -rw-r--r-- | boot/semantic.cc | 22 |
1 files changed, 0 insertions, 22 deletions
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>(type_expectation_error::kind::result, - unit->return_expression->position()); - } - } - else - { - add_error<return_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(); } } |
