modified: src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntacticSugar.java
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 2m21s

Im Visitor ReturnFinder wuder nicht beruecksichtigt, dass auch in einem Lambda-Ausdruck ein Reurn stehen kann, welchen die umgebenden Block nicht beendet.
This commit is contained in:
pl@gohorb.ba-horb.de 2024-04-09 18:25:26 +02:00
parent e6cd4038e2
commit bcce4cee19

View File

@ -34,6 +34,11 @@ public class SyntacticSugar {
public void visit(ReturnVoid aReturn) { public void visit(ReturnVoid aReturn) {
hasReturn = true; hasReturn = true;
} }
@Override
public void visit(LambdaExpression le) {
//PL 2024-04-09 Do nothing, as in a LambdaExpression a return could be
}
} }
private static boolean hasReturn(Block block) { private static boolean hasReturn(Block block) {