summaryrefslogtreecommitdiff
path: root/vala/valaparser.vala
diff options
context:
space:
mode:
authorPrinceton Ferro <princetonferro@gmail.com>2022-01-17 12:28:31 -0500
committerRico Tzschichholz <ricotz@ubuntu.com>2022-01-19 09:37:21 +0100
commiteea3a2ac0e6ef4e88df5e9424b486f399d7ff036 (patch)
treeda2b46148ae2f181165558e822eda2f074bc9aa8 /vala/valaparser.vala
parent47d85ba624c4ba91e4c8cc6a380643f6371b683a (diff)
downloadvala-eea3a2ac0e6ef4e88df5e9424b486f399d7ff036.tar.gz
vala: async-ize main block when yield is used
This allows yield statements and expressions to be used in the main block.
Diffstat (limited to 'vala/valaparser.vala')
-rw-r--r--vala/valaparser.vala2
1 files changed, 1 insertions, 1 deletions
diff --git a/vala/valaparser.vala b/vala/valaparser.vala
index 2f3a99016..ebb914da1 100644
--- a/vala/valaparser.vala
+++ b/vala/valaparser.vala
@@ -2637,7 +2637,7 @@ public class Vala.Parser : CodeVisitor {
void parse_main_block (Symbol parent) throws ParseError {
var begin = get_location ();
- var method = new Method ("main", new VoidType (), new SourceReference (scanner.source_file, begin, begin));
+ var method = new Method.main_block (new SourceReference (scanner.source_file, begin, begin));
method.access = SymbolAccessibility.PUBLIC;
method.binding = MemberBinding.STATIC;
method.body = new Block (get_src (begin));