diff options
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(); } } |
