2008-07-05 Jared Moore <jaredm@svn.gnome.org>
* vala/valasemanticanalyzer.vala:
Prevent "main" method from throwing errors, fixes bug 538248.
svn path=/trunk/; revision=1676
2008-07-05 Jared Moore <jaredm@svn.gnome.org>
+ * vala/valasemanticanalyzer.vala:
+
+ Prevent "main" method from throwing errors, fixes bug 538248.
+
+2008-07-05 Jared Moore <jaredm@svn.gnome.org>
+
* vala/valaparser.vala:
Add workaround for exception codegen problem, fixes bug 535247.
}
}
+ if (m.tree_can_fail && m.name == "main") {
+ Report.error (m.source_reference, "\"main\" method cannot throw errors");
+ }
+
// check that all errors that can be thrown in the method body are declared
if (m.body != null) {
foreach (DataType body_error_type in m.body.get_error_types ()) {