2007-08-30 Juerg Billeter <j@bitron.ch>
* vala/valasemanticanalyzer.vala: improve error reporting for foreach
statements
svn path=/trunk/; revision=542
2007-08-30 Jürg Billeter <j@bitron.ch>
+ * vala/valasemanticanalyzer.vala: improve error reporting for foreach
+ statements
+
+2007-08-30 Jürg Billeter <j@bitron.ch>
+
* vapi/Makefile.am, vapi/clutter-0.4.deps, vapi/clutter-0.4.vala,
vapi/packages/clutter-0.4/: remove clutter bindings, will be moved
to clutter svn
}
public override void visit_end_foreach_statement (ForeachStatement! stmt) {
+ if (stmt.collection.error) {
+ // ignore inner error
+ stmt.error = true;
+ return;
+ }
+
stmt.collection_variable_declarator = new VariableDeclarator ("%s_collection".printf (stmt.variable_name));
stmt.collection_variable_declarator.type_reference = stmt.collection.static_type.copy ();
stmt.collection_variable_declarator.type_reference.transfers_ownership = false;