fixed tests
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
Bruder John 2024-06-21 18:09:32 +02:00
parent 9edee73705
commit 1b91e25d17

View File

@ -181,8 +181,13 @@ public class SemanticAnalyzer implements SemanticVisitor {
@Override @Override
public TypeCheckResult analyze(ReturnStatementNode toCheck) { public TypeCheckResult analyze(ReturnStatementNode toCheck) {
var result = toCheck.expression.accept(this); if(toCheck.expression != null){
return new TypeCheckResult(true, result.getType()); var result = toCheck.expression.accept(this);
return new TypeCheckResult(true, result.getType());
} else {
return new TypeCheckResult(false, null);
}
} }
@Override @Override