fixed tests
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
9edee73705
commit
1b91e25d17
@ -181,8 +181,13 @@ public class SemanticAnalyzer implements SemanticVisitor {
|
||||
@Override
|
||||
public TypeCheckResult analyze(ReturnStatementNode toCheck) {
|
||||
|
||||
var result = toCheck.expression.accept(this);
|
||||
return new TypeCheckResult(true, result.getType());
|
||||
if(toCheck.expression != null){
|
||||
var result = toCheck.expression.accept(this);
|
||||
return new TypeCheckResult(true, result.getType());
|
||||
} else {
|
||||
return new TypeCheckResult(false, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user