File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
de.peeeq.wurstscript/src/main/java/de/peeeq/wurstscript/validation Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -624,7 +624,7 @@ private void visit(StmtExitwhen exitwhen) {
624624
625625 private void visit (StmtContinue stmtContinue ) {
626626 Element parent = stmtContinue .getParent ();
627- while (!(parent instanceof FunctionDefinition )) {
627+ while (parent != null && !(parent instanceof FunctionDefinition )) {
628628 if (parent instanceof StmtForEach ) {
629629 StmtForEach forEach = (StmtForEach ) parent ;
630630 if (forEach .getIn ().tryGetNameDef ().attrIsVararg ()) {
@@ -636,7 +636,7 @@ private void visit(StmtContinue stmtContinue) {
636636 }
637637 parent = parent .getParent ();
638638 }
639- stmtContinue .addError ("Continue is not allowed outside of loop statements ." );
639+ stmtContinue .addError ("Continue statements must be used inside a loop ." );
640640 }
641641
642642 private void checkTupleDef (TupleDef e ) {
You can’t perform that action at this time.
0 commit comments