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
|
@Override
|
||||||
public TypeCheckResult analyze(ReturnStatementNode toCheck) {
|
public TypeCheckResult analyze(ReturnStatementNode toCheck) {
|
||||||
|
|
||||||
|
if(toCheck.expression != null){
|
||||||
var result = toCheck.expression.accept(this);
|
var result = toCheck.expression.accept(this);
|
||||||
return new TypeCheckResult(true, result.getType());
|
return new TypeCheckResult(true, result.getType());
|
||||||
|
} else {
|
||||||
|
return new TypeCheckResult(false, null);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user