]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
parser: Don't bail parsing of yield expression on error
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 17 Oct 2021 07:15:58 +0000 (09:15 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 19 Oct 2021 07:48:36 +0000 (09:48 +0200)
Reporting the error is enough to handle this properly.

vala/valaparser.vala

index 1424d3e2c770a879bd74b450e1debcd770f33d69..97406a9574e61eb87ae90539c9511187c27f9c16 100644 (file)
@@ -1069,7 +1069,7 @@ public class Vala.Parser : CodeVisitor {
                unowned ObjectCreationExpression? object_creation = expr as ObjectCreationExpression;
                if (call == null && object_creation == null) {
                        Report.error (expr.source_reference, "syntax error, expected method call");
-                       throw new ParseError.SYNTAX ("expected method call");
+                       expr.error = true;
                }
 
                if (call != null) {