fix message errors

This commit is contained in:
2024-08-14 16:09:24 +00:00
parent 70a0d2ab0a
commit 1e028570e9
2 changed files with 5 additions and 4 deletions

View File

@ -130,11 +130,11 @@ void ASTSemanticCheckVisitor::ActuralVisit(JmpStatement_ASTNode *node) {
has_return = true;
node->return_value->accept(this);
if (cur_func_schema.return_type != node->return_value->expr_type_info) {
throw SemanticError("Return type mismatch", 1);
throw SemanticError("Type Mismatch", 1);
}
} else {
if (cur_func_schema.return_type != "void") {
throw SemanticError("Return type mismatch", 1);
throw SemanticError("Type Mismatch", 1);
}
}
}